From 9477f9d347d6e150be8f5476af795347ead64625 Mon Sep 17 00:00:00 2001 From: Justin Date: Wed, 20 Jul 2022 09:21:24 -0400 Subject: [PATCH] Add files via upload --- chat/attack.php | 504 ++++++++++++++++ chat/commands.php | 1251 ++++++++++++++++++++++++++++++++++++++++ chat/csplit_box.php | 94 +++ chat/dark.php | 628 ++++++++++++++++++++ chat/img_upload.php | 56 ++ chat/index.php | 571 ++++++++++++++++++ chat/messages-dark.php | 325 +++++++++++ chat/messages.php | 324 +++++++++++ chat/online-dark.php | 165 ++++++ chat/online.php | 165 ++++++ chat/online_upd.php | 9 + chat/pm_send.php | 30 + chat/save.php | 27 + chat/send.php | 616 ++++++++++++++++++++ chat/send_sticky.php | 116 ++++ chat/telegram-send.php | 53 ++ chat/telegram.php | 572 ++++++++++++++++++ chat/toggle_cspl.php | 12 + chat/typing.php | 13 + chat/typing_stop.php | 6 + chat/vid_upload.php | 63 ++ chat/wide.php | 402 +++++++++++++ 22 files changed, 6002 insertions(+) create mode 100644 chat/attack.php create mode 100644 chat/commands.php create mode 100644 chat/csplit_box.php create mode 100644 chat/dark.php create mode 100644 chat/img_upload.php create mode 100644 chat/messages-dark.php create mode 100644 chat/messages.php create mode 100644 chat/online-dark.php create mode 100644 chat/online.php create mode 100644 chat/online_upd.php create mode 100644 chat/pm_send.php create mode 100644 chat/save.php create mode 100644 chat/send.php create mode 100644 chat/send_sticky.php create mode 100644 chat/telegram-send.php create mode 100644 chat/telegram.php create mode 100644 chat/toggle_cspl.php create mode 100644 chat/typing.php create mode 100644 chat/typing_stop.php create mode 100644 chat/vid_upload.php create mode 100644 chat/wide.php diff --git a/chat/attack.php b/chat/attack.php new file mode 100644 index 0000000..1e70e00 --- /dev/null +++ b/chat/attack.php @@ -0,0 +1,504 @@ += '300' && $u_chatgames == 'yes') { + $post = "n"; + mysqli_query($conx, "UPDATE accounts SET funds='$u_funds'-300 WHERE uid='$u_uid'"); + mysqli_query($conx, "UPDATE accounts SET chat_shield_tstamp='$tstamp'+60 WHERE uid='$u_uid'"); + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username has used a shield. [60s]', '$tstamp')"); +} +// Shield+ +if ($var[0] == '/shp' && $u_funds >= '700' && $u_chatgames == 'yes') { + $post = "n"; + mysqli_query($conx, "UPDATE accounts SET funds='$u_funds'-700 WHERE uid='$u_uid'"); + mysqli_query($conx, "UPDATE accounts SET chat_shield_tstamp='$tstamp'+120 WHERE uid='$u_uid'"); + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username has used a shield. [2min]', '$tstamp')"); +} +// Shield++ +if ($var[0] == '/shpp' && $u_funds >= '1200' && $u_chatgames == 'yes') { + $post = "n"; + mysqli_query($conx, "UPDATE accounts SET funds='$u_funds'-1200 WHERE uid='$u_uid'"); + mysqli_query($conx, "UPDATE accounts SET chat_shield_tstamp='$tstamp'+300 WHERE uid='$u_uid'"); + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username has used a shield. [5min]', '$tstamp')"); +} +// SHOOT +if ($var[0] == '/s' && $var[1] && $u_funds >= '50' && $u_chatgames == 'yes') { + $post = "n"; + $sakfsajadfjl = $var[1]; + $sadfasdfas = mysqli_query($conx, "SELECT uid,username,chat_attack_hp,chat_shield_tstamp,jailed FROM accounts WHERE username='$sakfsajadfjl'"); + $sadfas = mysqli_fetch_assoc($sadfasdfas); + $sadf_uid = $sadfas['uid']; + $sadf_uname = $sadfas['username']; + $cchat_attack_hp = $sadfas['chat_attack_hp']; + $cchat_shld_tstamp = $sadfas['chat_shield_tstamp']; + $cchat_isjailed = $sadfas['jailed']; + $new_cchat_attack_hp = $cchat_attack_hp-10; + if($new_cchat_attack_hp <= 0) { + $new_cchat_attack_hp = "0"; + } + if($sadf_uid != '' && $sadf_uid != $u_uid) { + if($cchat_attack_hp > '0') { + if($cchat_isjailed == 'yes') { + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username attempted to shoot @$sadf_uname but they are currently jailed.', '$tstamp')"); + } + else { + if($tstamp > $cchat_shld_tstamp) { + mysqli_query($conx, "UPDATE accounts SET chat_attack_hp='$cchat_attack_hp'-10 WHERE uid='$sadf_uid'"); + mysqli_query($conx, "UPDATE accounts SET funds='$u_funds'-50 WHERE uid='$u_uid'"); + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username shot @$sadf_uname. [HP: $new_cchat_attack_hp]', '$tstamp')"); + } + else { + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username attempted to shoot @$sadf_uname but they are currently shielded. B)', '$tstamp')"); + } + } + } + else { + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username attempted to shoot @$sadf_uname but they are already dead..', '$tstamp')"); + } +} +} +// nuke +if ($var[0] == '/nuke' && $var[1] && $u_funds >= '10000' && $u_chatgames == 'yes') { + $post = "n"; + $sakfsajadfjl = $var[1]; + $sadfasdfas = mysqli_query($conx, "SELECT uid,username,chat_attack_hp,chat_shield_tstamp,jailed FROM accounts WHERE username='$sakfsajadfjl'"); + $sadfas = mysqli_fetch_assoc($sadfasdfas); + $sadf_uid = $sadfas['uid']; + $sadf_uname = $sadfas['username']; + $cchat_attack_hp = $sadfas['chat_attack_hp']; + $cchat_shld_tstamp = $sadfas['chat_shield_tstamp']; + $cchat_isjailed = $sadfas['jailed']; + $new_cchat_attack_hp = $cchat_attack_hp-100; + if($new_cchat_attack_hp <= 0) { + $new_cchat_attack_hp = "0"; + } + if($sadf_uid != '' && $sadf_uid != $u_uid) { + if($cchat_attack_hp > '0') { + if($cchat_isjailed == 'yes') { + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username attempted to nuke @$sadf_uname but they are currently jailed.', '$tstamp')"); + } + else { + if($tstamp > $cchat_shld_tstamp) { + mysqli_query($conx, "UPDATE accounts SET chat_attack_hp='$cchat_attack_hp'-100 WHERE uid='$sadf_uid'"); + mysqli_query($conx, "UPDATE accounts SET funds='$u_funds'-10000 WHERE uid='$u_uid'"); + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username nuked @$sadf_uname. [HP: $new_cchat_attack_hp]', '$tstamp')"); + } + else { + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username attempted to nuke @$sadf_uname but they are currently shielded. B)', '$tstamp')"); + } + } + } + else { + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username attempted to nuke @$sadf_uname but they are already dead..', '$tstamp')"); + } +} +} +// suicide +if ($var[0] == '/suicide' && $u_funds >= '10000' && $u_chatgames == 'yes') { + $post = "n"; + $sakfsajadfjl = $u_username; + $sadfasdfas = mysqli_query($conx, "SELECT uid,username,chat_attack_hp,chat_shield_tstamp,jailed FROM accounts WHERE username='$sakfsajadfjl'"); + $sadfas = mysqli_fetch_assoc($sadfasdfas); + $sadf_uid = $sadfas['uid']; + $sadf_uname = $sadfas['username']; + $cchat_attack_hp = $sadfas['chat_attack_hp']; + $cchat_shld_tstamp = $sadfas['chat_shield_tstamp']; + $cchat_isjailed = $sadfas['jailed']; + $new_cchat_attack_hp = $cchat_attack_hp-100; + if($new_cchat_attack_hp <= 0) { + $new_cchat_attack_hp = "0"; + } + if($sadf_uid != '') { + if($cchat_attack_hp > '0') { + if($cchat_isjailed == 'yes') { + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username attempted to commit suicide but they are currently jailed.', '$tstamp')"); + } + else { + if($tstamp > $cchat_shld_tstamp) { + mysqli_query($conx, "UPDATE accounts SET chat_attack_hp='$cchat_attack_hp'-100 WHERE uid='$sadf_uid'"); + mysqli_query($conx, "UPDATE accounts SET funds='$u_funds'-10000 WHERE uid='$u_uid'"); + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username commited suicide. [HP: $new_cchat_attack_hp]', '$tstamp')"); + } + else { + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username attempted to commit suicide but they are currently shielded. B)', '$tstamp')"); + } + } + } + else { + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username attempted to commit suicide but they are already dead..', '$tstamp')"); + } +} +} +// Punch +if ($var[0] == '/p' && $var[1] && $u_funds >= '15' && $u_chatgames == 'yes') { + $post = "n"; + $sakfsajadfjl = $var[1]; + $sadfasdfas = mysqli_query($conx, "SELECT uid,username,chat_attack_hp,chat_shield_tstamp,jailed FROM accounts WHERE username='$sakfsajadfjl'"); + $sadfas = mysqli_fetch_assoc($sadfasdfas); + $sadf_uid = $sadfas['uid']; + $sadf_uname = $sadfas['username']; + $cchat_attack_hp = $sadfas['chat_attack_hp']; + $cchat_shld_tstamp = $sadfas['chat_shield_tstamp']; + $cchat_isjailed = $sadfas['jailed']; + $new_cchat_attack_hp = $cchat_attack_hp-1; + if($new_cchat_attack_hp <= 0) { + $new_cchat_attack_hp = "0"; + } + if($sadf_uid != '' && $sadf_uid != $u_uid) { + if($cchat_attack_hp > '0') { + if($cchat_isjailed == 'yes') { + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username attempted to punch @$sadf_uname but they are currently jailed.', '$tstamp')"); + } + else { + if($tstamp > $cchat_shld_tstamp) { + mysqli_query($conx, "UPDATE accounts SET chat_attack_hp='$cchat_attack_hp'-1 WHERE uid='$sadf_uid'"); + mysqli_query($conx, "UPDATE accounts SET funds='$u_funds'-15 WHERE uid='$u_uid'"); + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username punched @$sadf_uname. [HP: $new_cchat_attack_hp]', '$tstamp')"); + } + else { + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username attempted to punched @$sadf_uname but they are currently shielded. B)', '$tstamp')"); + } + } + } + else { + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username attempted to punched @$sadf_uname but they are already dead..', '$tstamp')"); + } +} +} +// stab +if ($var[0] == '/st' && $var[1] && $u_funds >= '30' && $u_chatgames == 'yes') { + $post = "n"; + $sakfsajadfjl = $var[1]; + $sadfasdfas = mysqli_query($conx, "SELECT uid,username,chat_attack_hp,chat_shield_tstamp,jailed FROM accounts WHERE username='$sakfsajadfjl'"); + $sadfas = mysqli_fetch_assoc($sadfasdfas); + $sadf_uid = $sadfas['uid']; + $sadf_uname = $sadfas['username']; + $cchat_attack_hp = $sadfas['chat_attack_hp']; + $cchat_shld_tstamp = $sadfas['chat_shield_tstamp']; + $cchat_isjailed = $sadfas['jailed']; + $new_cchat_attack_hp = $cchat_attack_hp-5; + if($new_cchat_attack_hp <= 0) { + $new_cchat_attack_hp = "0"; + } + if($sadf_uid != '' && $sadf_uid != $u_uid) { + if($cchat_attack_hp > '0') { + if($cchat_isjailed == 'yes') { + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username attempted to stab @$sadf_uname but they are currently jailed.', '$tstamp')"); + } + else { + if($tstamp > $cchat_shld_tstamp) { + mysqli_query($conx, "UPDATE accounts SET chat_attack_hp='$cchat_attack_hp'-5 WHERE uid='$sadf_uid'"); + mysqli_query($conx, "UPDATE accounts SET funds='$u_funds'-30 WHERE uid='$u_uid'"); + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username stabbed @$sadf_uname. [HP: $new_cchat_attack_hp]', '$tstamp')"); + } + else { + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username attempted to stabbed @$sadf_uname but they are currently shielded. B)', '$tstamp')"); + } + } + } + else { + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username attempted to stabbed @$sadf_uname but they are already dead..', '$tstamp')"); + } +} +} +// BREAK SHIELD +if ($var[0] == '/bs' && $var[1] && $u_funds >= '1000' && $u_chatgames == 'yes') { + $post = "n"; + $sakfsajadfjl = $var[1]; + $sadfasdfas = mysqli_query($conx, "SELECT uid,username,chat_attack_hp,chat_shield_tstamp,jailed FROM accounts WHERE username='$sakfsajadfjl'"); + $sadfas = mysqli_fetch_assoc($sadfasdfas); + $sadf_uid = $sadfas['uid']; + $sadf_uname = $sadfas['username']; + $cchat_attack_hp = $sadfas['chat_attack_hp']; + $cchat_shld_tstamp = $sadfas['chat_shield_tstamp']; + $cchat_isjailed = $sadfas['jailed']; + $new_cchat_attack_hp = $cchat_attack_hp-10; + if($new_cchat_attack_hp <= 0) { + $new_cchat_attack_hp = "0"; + } + if($sadf_uid != '' && $sadf_uid != $u_uid) { + if($cchat_attack_hp > '0') { + if($cchat_isjailed == 'yes') { + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username attempted to break the shield of @$sadf_uname but they are currently jailed.', '$tstamp')"); + } + else { + if($tstamp < $cchat_shld_tstamp) { + mysqli_query($conx, "UPDATE accounts SET chat_shield_tstamp='0' WHERE uid='$sadf_uid'"); + mysqli_query($conx, "UPDATE accounts SET funds='$u_funds'-1000 WHERE uid='$u_uid'"); + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username broke the shield of @$sadf_uname.', '$tstamp')"); +} +else { + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } +mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username attempted to break the shield of @$sadf_uname but they are not currently shielded.', '$tstamp')"); +} + } + } + else { + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username attempted to break the shield of @$sadf_uname but they are currently dead..', '$tstamp')"); + } +} +} +// CHAT ATTACK +// CHAT ATTACK +// CHAT ATTACK +// CHAT ATTACK +// CHAT ATTACK +// CHAT ATTACK +// CHAT ATTACK +// CHAT ATTACK +// CHAT ATTACK +// CHAT ATTACK +// CHAT ATTACK +// CHAT ATTACK +?> diff --git a/chat/commands.php b/chat/commands.php new file mode 100644 index 0000000..44ba470 --- /dev/null +++ b/chat/commands.php @@ -0,0 +1,1251 @@ += 100) { + mysqli_query($conx, "UPDATE accounts SET chat_attack_hp='100' WHERE uid='871'"); + } + else { + mysqli_query($conx, "UPDATE accounts SET chat_attack_hp='$unchathp'+2 WHERE uid='871'"); + } + mysqli_query($conx, "UPDATE accounts SET chat_time='$tstamp'+200 WHERE uid='871'"); + mysqli_query($conx, "UPDATE accounts SET online_time='$tstamp'+200 WHERE uid='871'"); + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp, bot_controller) VALUES ('871', '$stringgy', '$tstamp','$u_username')"); + $post = "n"; +} + + +if($var[0] == '/narjis' && $var[1] && $u_cont_mang == 'yes') { + $cgtq = mysqli_query($conx, "SELECT uid,username,chat_attack_hp FROM accounts WHERE uid='807'"); + $cgtr = mysqli_fetch_assoc($cgtq); + $uidg = $cgtr['uid']; + $unameg = $cgtr['username']; + $unchathp = $cgtr['chat_attack_hp']; + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $stringgy = explode (' ', $chat_txt, 2); + $stringgy = $stringgy[1]; + $jb_uid = "807"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + if($unchathp <= 0) { + mysqli_query($conx, "UPDATE accounts SET chat_attack_hp='100' WHERE uid='807'"); + } + elseif($unchathp >= 100) { + mysqli_query($conx, "UPDATE accounts SET chat_attack_hp='100' WHERE uid='807'"); + } + else { + mysqli_query($conx, "UPDATE accounts SET chat_attack_hp='$unchathp'+2 WHERE uid='807'"); + } + mysqli_query($conx, "UPDATE accounts SET chat_time='$tstamp'+200 WHERE uid='807'"); + mysqli_query($conx, "UPDATE accounts SET online_time='$tstamp'+200 WHERE uid='807'"); + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp, bot_controller) VALUES ('807', '$stringgy', '$tstamp','$u_username')"); + $post = "n"; +} + + +if($var[0] == '/joseph' && $var[1] && $u_cont_mang == 'yes') { + $cgtq = mysqli_query($conx, "SELECT uid,username,chat_attack_hp FROM accounts WHERE uid='872'"); + $cgtr = mysqli_fetch_assoc($cgtq); + $uidg = $cgtr['uid']; + $unameg = $cgtr['username']; + $unchathp = $cgtr['chat_attack_hp']; + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $stringgy = explode (' ', $chat_txt, 2); + $stringgy = $stringgy[1]; + $jb_uid = "872"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + if($unchathp <= 0) { + mysqli_query($conx, "UPDATE accounts SET chat_attack_hp='100' WHERE uid='872'"); + } + elseif($unchathp >= 100) { + mysqli_query($conx, "UPDATE accounts SET chat_attack_hp='100' WHERE uid='872'"); + } + else { + mysqli_query($conx, "UPDATE accounts SET chat_attack_hp='$unchathp'+2 WHERE uid='872'"); + } + mysqli_query($conx, "UPDATE accounts SET chat_time='$tstamp'+200 WHERE uid='872'"); + mysqli_query($conx, "UPDATE accounts SET online_time='$tstamp'+200 WHERE uid='872'"); + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp, bot_controller) VALUES ('872', '$stringgy', '$tstamp','$u_username')"); + $post = "n"; +} + + + + +if($var[0] == '/nazi' && $var[1] && $u_cont_mang == 'yes') { + $cgtq = mysqli_query($conx, "SELECT uid,username,chat_attack_hp FROM accounts WHERE uid='874'"); + $cgtr = mysqli_fetch_assoc($cgtq); + $uidg = $cgtr['uid']; + $unameg = $cgtr['username']; + $unchathp = $cgtr['chat_attack_hp']; + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $stringgy = explode (' ', $chat_txt, 2); + $stringgy = $stringgy[1]; + $jb_uid = "874"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + if($unchathp <= 0) { + mysqli_query($conx, "UPDATE accounts SET chat_attack_hp='100' WHERE uid='874'"); + } + elseif($unchathp >= 100) { + mysqli_query($conx, "UPDATE accounts SET chat_attack_hp='100' WHERE uid='874'"); + } + else { + mysqli_query($conx, "UPDATE accounts SET chat_attack_hp='$unchathp'+2 WHERE uid='874'"); + } + mysqli_query($conx, "UPDATE accounts SET chat_time='$tstamp'+200 WHERE uid='874'"); + mysqli_query($conx, "UPDATE accounts SET online_time='$tstamp'+200 WHERE uid='874'"); + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp, bot_controller) VALUES ('874', '$stringgy', '$tstamp','$u_username')"); + $post = "n"; +} + + +if($var[0] == '/misdew' && $var[1] && $u_cont_mang == 'yes') { + $cgtq = mysqli_query($conx, "SELECT uid,username,chat_attack_hp FROM accounts WHERE uid='6'"); + $cgtr = mysqli_fetch_assoc($cgtq); + $uidg = $cgtr['uid']; + $unameg = $cgtr['username']; + $unchathp = $cgtr['chat_attack_hp']; + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $stringgy = explode (' ', $chat_txt, 2); + $stringgy = $stringgy[1]; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + if($unchathp <= 0) { + mysqli_query($conx, "UPDATE accounts SET chat_attack_hp='100' WHERE uid='6'"); + } + elseif($unchathp >= 100) { + mysqli_query($conx, "UPDATE accounts SET chat_attack_hp='100' WHERE uid='6'"); + } + else { + mysqli_query($conx, "UPDATE accounts SET chat_attack_hp='$unchathp'+2 WHERE uid='6'"); + } + mysqli_query($conx, "UPDATE accounts SET chat_time='$tstamp'+200 WHERE uid='6'"); + mysqli_query($conx, "UPDATE accounts SET online_time='$tstamp'+200 WHERE uid='6'"); + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp, bot_controller) VALUES ('6', '$stringgy', '$tstamp','$u_username')"); + $post = "n"; +} + + +if($var[0] == '/cooldude' && $var[1] && $u_cont_mang == 'yes') { + $cgtq = mysqli_query($conx, "SELECT uid,username,chat_attack_hp FROM accounts WHERE uid='642'"); + $cgtr = mysqli_fetch_assoc($cgtq); + $uidg = $cgtr['uid']; + $unameg = $cgtr['username']; + $unchathp = $cgtr['chat_attack_hp']; + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $stringgy = explode (' ', $chat_txt, 2); + $stringgy = $stringgy[1]; + $jb_uid = "642"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "UPDATE accounts SET chat_time='$tstamp'+120 WHERE uid='642'"); + if($unchathp <= 0) { + mysqli_query($conx, "UPDATE accounts SET chat_attack_hp='100' WHERE uid='642'"); + } + elseif($unchathp >= 100) { + mysqli_query($conx, "UPDATE accounts SET chat_attack_hp='100' WHERE uid='642'"); + } + else { + mysqli_query($conx, "UPDATE accounts SET chat_attack_hp='$unchathp'+2 WHERE uid='642'"); + } + mysqli_query($conx, "UPDATE accounts SET online_time='$tstamp'+120 WHERE uid='642'"); + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp, bot_controller) VALUES ('642', '$stringgy', '$tstamp','$u_username')"); + $post = "n"; +} + +if($var[0] == '/todo' && $var[1] && $u_cont_mang == 'yes') { + $cgtq = mysqli_query($conx, "SELECT uid,username,chat_attack_hp FROM accounts WHERE uid='641'"); + $cgtr = mysqli_fetch_assoc($cgtq); + $uidg = $cgtr['uid']; + $unameg = $cgtr['username']; + $unchathp = $cgtr['chat_attack_hp']; + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $stringgy = explode (' ', $chat_txt, 2); + $stringgy = $stringgy[1]; + $jb_uid = "641"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "UPDATE accounts SET chat_time='$tstamp'+120 WHERE uid='641'"); + if($unchathp <= 0) { + mysqli_query($conx, "UPDATE accounts SET chat_attack_hp='100' WHERE uid='641'"); + } + elseif($unchathp >= 100) { + mysqli_query($conx, "UPDATE accounts SET chat_attack_hp='100' WHERE uid='641'"); + } + else { + mysqli_query($conx, "UPDATE accounts SET chat_attack_hp='$unchathp'+2 WHERE uid='641'"); + } + mysqli_query($conx, "UPDATE accounts SET online_time='$tstamp'+120 WHERE uid='641'"); + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp, bot_controller) VALUES ('641', '$stringgy', '$tstamp','$u_username')"); + $post = "n"; +} + +if($var[0] == '/deku' && $var[1] && $u_cont_mang == 'yes') { + $cgtq = mysqli_query($conx, "SELECT uid,username,chat_attack_hp FROM accounts WHERE uid='643'"); + $cgtr = mysqli_fetch_assoc($cgtq); + $uidg = $cgtr['uid']; + $unameg = $cgtr['username']; + $unchathp = $cgtr['chat_attack_hp']; + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $stringgy = explode (' ', $chat_txt, 2); + $stringgy = $stringgy[1]; + $jb_uid = "643"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "UPDATE accounts SET chat_time='$tstamp'+120 WHERE uid='643'"); + if($unchathp <= 0) { + mysqli_query($conx, "UPDATE accounts SET chat_attack_hp='100' WHERE uid='643'"); + } + elseif($unchathp >= 100) { + mysqli_query($conx, "UPDATE accounts SET chat_attack_hp='100' WHERE uid='643'"); + } + else { + mysqli_query($conx, "UPDATE accounts SET chat_attack_hp='$unchathp'+2 WHERE uid='643'"); + } + mysqli_query($conx, "UPDATE accounts SET online_time='$tstamp'+120 WHERE uid='643'"); + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp, bot_controller) VALUES ('643', '$stringgy', '$tstamp','$u_username')"); + $post = "n"; +} + + +if ($var[0] == '/color' && $var[1]) { + mysqli_query($conx, "UPDATE user_theme_colors SET username_color='$var[1]' WHERE uid='$u_uid' && theme_id='$g_themeid'"); + $post = "n"; +} +if ($var[0] == '/tcolor' && $var[1]) { + mysqli_query($conx, "UPDATE user_theme_colors SET text_color='$var[1]' WHERE uid='$u_uid' && theme_id='$g_themeid'"); + $post = "n"; +} +if ($var[0] == '/clear' && $u_uid == '1') { + mysqli_query($conx, "TRUNCATE TABLE chat"); + $post = "n"; + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', 'Chat cleared.', '$tstamp')"); +} + +if ($var[0] == '/chat-rate' && $var[1] && $u_uid == '1') { + $post = "n"; + mysqli_query($conx, "UPDATE chat_games SET msgs_since='$var[1]' WHERE game_uqid='$perrate'"); +} +if ($var[0] == '/away') { + $post = "n"; + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username has left Chat.', '$tstamp')"); +} + +if ($var[0] == '/lurk') { + $post = "n"; + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($u_patreon == 'yes') { + if($u_lurker_mode == 'yes') { + mysqli_query($conx, "UPDATE accounts SET lurker_mode='no' WHERE uid='$u_uid'"); + } + else { + mysqli_query($conx, "UPDATE accounts SET lurker_mode='yes' WHERE uid='$u_uid'"); + } + } + else { + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username, you do not have access to the /lurk command.', '$tstamp')"); +} +} + + + + +if ($var[0] == '/strike' && $u_username == 'Seledity') { + $post = "n"; + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + $asdfdsaf = mysqli_query($conx, "SELECT xpert_strikes FROM accounts WHERE uid='871'"); + $asdfdsafr = mysqli_fetch_assoc($asdfdsaf); + $xpert_st = $asdfdsafr['xpert_strikes']; + mysqli_query($conx, "UPDATE accounts SET xpert_strikes='$xpert_st'+1 WHERE uid='871'"); + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username has added a strike to @xperttheef.', '$tstamp')"); +} + + +if ($var[0] == '/link' && $var[1]) { + $post = "n"; + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + $url = $var[1]; + $link_url = "$url"; + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username has sent a link: $link_url', '$tstamp')"); +} + + +if ($var[0] == '/ricardo') { + $post = "n"; + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username
:ricardo:', '$tstamp')"); +} + + +if ($var[0] == '/summon' && $var[1] && $u_funds >= '15') { + $post = "n"; + $varrrrrrrrr = $var[1]; + $sadfasdfas = mysqli_query($conx, "SELECT uid,username,telegram_id,telegram_verf FROM accounts WHERE username='$varrrrrrrrr'"); + $cgsadftr = mysqli_fetch_assoc($sadfasdfas); + $summoned_uid = $cgsadftr['uid']; + $summon_uname = $cgsadftr['username']; + $summon_telid = $cgsadftr['telegram_id']; + $summon_telverf = $cgsadftr['telegram_verf']; + if($summoned_uid != '') { + if(mysqli_num_rows(mysqli_query($conx, "SELECT id FROM user_apps WHERE uid='$summoned_uid' && app_uqid='chat' && snooze='no'")) != '0') { + function cgenRand($chatlength = 15) { + return substr(str_shuffle("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), 0, $chatlength); + } + $chatstr = cgenRand(); + mysqli_query($conx, "INSERT INTO notifs (rstring, uid, snoozeable, app_uqid, message, view_link, tstamp) VALUES ('$chatstr','$summoned_uid','yes','chat','$u_username has summoned you to Chat.','/chat','$tstamp')"); + //TELEGRAM NOTIF + //TELEGRAM NOTIF + //TELEGRAM NOTIF + if($summon_telid != '' && $summon_telverf == 'yes') { + $bot_id = "telegram bot id if u want to use this feature"; + $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) { + } + $botmsg = "$u_username has summoned you to Chat. misdew.com/chat"; + $url = 'https://api.telegram.org/bot' . $bot_id . '/sendMessage?text='. $botmsg .'&chat_id=' . $summon_telid; + $result = file_get_contents($url); + $result = json_decode($result, true); + } + //TELEGRAM NOTIF + //TELEGRAM NOTIF + //TELEGRAM NOTIF + mysqli_query($conx, "UPDATE accounts SET funds='$u_funds'-15 WHERE uid='$u_uid'"); + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username has summoned @$summon_uname to Chat. -15.00 MDF.', '$tstamp')"); + } + else { + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username attempted to summon @$summon_uname to Chat but they have Chat snoozed.', '$tstamp')"); + } + } +} + +if ($var[0] == '/boop' && $var[1] && $u_funds >= '30') { + $post = "n"; + $varrrrrrrrr = $var[1]; + $sadfasdfas = mysqli_query($conx, "SELECT telegram_id,telegram_verf,uid,username FROM accounts WHERE username='$varrrrrrrrr'"); + $cgsadftr = mysqli_fetch_assoc($sadfasdfas); + $summoned_uid = $cgsadftr['uid']; + $summon_uname = $cgsadftr['username']; + $summon_telid = $cgsadftr['telegram_id']; + $summon_telverf = $cgsadftr['telegram_verf']; + if($summoned_uid != '') { + if(mysqli_num_rows(mysqli_query($conx, "SELECT id FROM user_apps WHERE uid='$summoned_uid' && app_uqid='chat' && snooze='no'")) != '0') { + function cgenRand($chatlength = 15) { + return substr(str_shuffle("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), 0, $chatlength); + } + $chatstr = cgenRand(); + mysqli_query($conx, "INSERT INTO notifs (rstring, uid, snoozeable, app_uqid, message, view_link, tstamp) VALUES ('$chatstr','$summoned_uid','yes','chat','$u_username has booped you to Chat.','/chat','$tstamp')"); + //TELEGRAM NOTIF + //TELEGRAM NOTIF + //TELEGRAM NOTIF + if($summon_telid != '' && $summon_telverf == 'yes') { + $bot_id = "telegram bot id if u want to use this feature"; + $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) { + } + $botmsg = "$u_username has booped you to Chat. misdew.com/chat"; + $url = 'https://api.telegram.org/bot' . $bot_id . '/sendMessage?text='. $botmsg .'&chat_id=' . $summon_telid; + $result = file_get_contents($url); + $result = json_decode($result, true); + } + //TELEGRAM NOTIF + //TELEGRAM NOTIF + //TELEGRAM NOTIF + mysqli_query($conx, "UPDATE accounts SET funds='$u_funds'-30 WHERE uid='$u_uid'"); + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username has booped @$summon_uname to Chat. -30.00 MDF.', '$tstamp')"); + } + else { + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username attempted to boop @$summon_uname to Chat but they have Chat snoozed.', '$tstamp')"); + } + } +} + +if ($var[0] == '/bal') { + $post = "n"; + $chatt_funds = number_format((float)$u_funds, 2, '.', ''); + $chatt_funds = number_format($chatt_funds, 2, '.', ','); + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username, you have $chatt_funds MDF.', '$tstamp')"); +} + +// CHAT ATTACK +// CHAT ATTACK +// CHAT ATTACK +// CHAT ATTACK +// CHAT ATTACK +// CHAT ATTACK +// CHAT ATTACK +// CHAT ATTACK +// CHAT ATTACK +// CHAT ATTACK +// CHAT ATTACK +// CHAT ATTACK +// Shield +if ($var[0] == '/shd' && $u_funds >= '300' && $u_chatgames == 'yes') { + $post = "n"; + mysqli_query($conx, "UPDATE accounts SET funds='$u_funds'-300 WHERE uid='$u_uid'"); + mysqli_query($conx, "UPDATE accounts SET chat_shield_tstamp='$tstamp'+60 WHERE uid='$u_uid'"); + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username has used a shield. [60s]', '$tstamp')"); +} +// Shield+ +if ($var[0] == '/shp' && $u_funds >= '700' && $u_chatgames == 'yes') { + $post = "n"; + mysqli_query($conx, "UPDATE accounts SET funds='$u_funds'-700 WHERE uid='$u_uid'"); + mysqli_query($conx, "UPDATE accounts SET chat_shield_tstamp='$tstamp'+120 WHERE uid='$u_uid'"); + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username has used a shield. [2min]', '$tstamp')"); +} +// Shield++ +if ($var[0] == '/shpp' && $u_funds >= '1200' && $u_chatgames == 'yes') { + $post = "n"; + mysqli_query($conx, "UPDATE accounts SET funds='$u_funds'-1200 WHERE uid='$u_uid'"); + mysqli_query($conx, "UPDATE accounts SET chat_shield_tstamp='$tstamp'+300 WHERE uid='$u_uid'"); + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username has used a shield. [5min]', '$tstamp')"); +} +// SHOOT +if ($var[0] == '/s' && $var[1] && $u_funds >= '50' && $u_chatgames == 'yes') { + $post = "n"; + $sakfsajadfjl = $var[1]; + $sadfasdfas = mysqli_query($conx, "SELECT uid,username,chat_attack_hp,chat_shield_tstamp,jailed FROM accounts WHERE username='$sakfsajadfjl'"); + $sadfas = mysqli_fetch_assoc($sadfasdfas); + $sadf_uid = $sadfas['uid']; + $sadf_uname = $sadfas['username']; + $cchat_attack_hp = $sadfas['chat_attack_hp']; + $cchat_shld_tstamp = $sadfas['chat_shield_tstamp']; + $cchat_isjailed = $sadfas['jailed']; + $new_cchat_attack_hp = $cchat_attack_hp-10; + if($new_cchat_attack_hp <= 0) { + $new_cchat_attack_hp = "0"; + } + if($sadf_uid != '' && $sadf_uid != $u_uid) { + if($cchat_attack_hp > '0') { + if($cchat_isjailed == 'yes') { + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username attempted to shoot @$sadf_uname but they are currently jailed.', '$tstamp')"); + } + else { + if($tstamp > $cchat_shld_tstamp) { + mysqli_query($conx, "UPDATE accounts SET chat_attack_hp='$cchat_attack_hp'-10 WHERE uid='$sadf_uid'"); + mysqli_query($conx, "UPDATE accounts SET funds='$u_funds'-50 WHERE uid='$u_uid'"); + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username shot @$sadf_uname. [HP: $new_cchat_attack_hp]', '$tstamp')"); + } + else { + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username attempted to shoot @$sadf_uname but they are currently shielded. B)', '$tstamp')"); + } + } + } + else { + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username attempted to shoot @$sadf_uname but they are already dead..', '$tstamp')"); + } +} +} +// nuke +if ($var[0] == '/nuke' && $var[1] && $u_funds >= '10000' && $u_chatgames == 'yes') { + $post = "n"; + $sakfsajadfjl = $var[1]; + $sadfasdfas = mysqli_query($conx, "SELECT uid,username,chat_attack_hp,chat_shield_tstamp,jailed FROM accounts WHERE username='$sakfsajadfjl'"); + $sadfas = mysqli_fetch_assoc($sadfasdfas); + $sadf_uid = $sadfas['uid']; + $sadf_uname = $sadfas['username']; + $cchat_attack_hp = $sadfas['chat_attack_hp']; + $cchat_shld_tstamp = $sadfas['chat_shield_tstamp']; + $cchat_isjailed = $sadfas['jailed']; + $new_cchat_attack_hp = $cchat_attack_hp-100; + if($new_cchat_attack_hp <= 0) { + $new_cchat_attack_hp = "0"; + } + if($sadf_uid != '' && $sadf_uid != $u_uid) { + if($cchat_attack_hp > '0') { + if($cchat_isjailed == 'yes') { + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username attempted to nuke @$sadf_uname but they are currently jailed.', '$tstamp')"); + } + else { + if($tstamp > $cchat_shld_tstamp) { + mysqli_query($conx, "UPDATE accounts SET chat_attack_hp='$cchat_attack_hp'-100 WHERE uid='$sadf_uid'"); + mysqli_query($conx, "UPDATE accounts SET funds='$u_funds'-10000 WHERE uid='$u_uid'"); + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username nuked @$sadf_uname. [HP: $new_cchat_attack_hp]', '$tstamp')"); + } + else { + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username attempted to nuke @$sadf_uname but they are currently shielded. B)', '$tstamp')"); + } + } + } + else { + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username attempted to nuke @$sadf_uname but they are already dead..', '$tstamp')"); + } +} +} +// suicide +if ($var[0] == '/suicide' && $u_funds >= '10000' && $u_chatgames == 'yes') { + $post = "n"; + $sakfsajadfjl = $u_username; + $sadfasdfas = mysqli_query($conx, "SELECT uid,username,chat_attack_hp,chat_shield_tstamp,jailed FROM accounts WHERE username='$sakfsajadfjl'"); + $sadfas = mysqli_fetch_assoc($sadfasdfas); + $sadf_uid = $sadfas['uid']; + $sadf_uname = $sadfas['username']; + $cchat_attack_hp = $sadfas['chat_attack_hp']; + $cchat_shld_tstamp = $sadfas['chat_shield_tstamp']; + $cchat_isjailed = $sadfas['jailed']; + $new_cchat_attack_hp = $cchat_attack_hp-100; + if($new_cchat_attack_hp <= 0) { + $new_cchat_attack_hp = "0"; + } + if($sadf_uid != '') { + if($cchat_attack_hp > '0') { + if($cchat_isjailed == 'yes') { + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username attempted to commit suicide but they are currently jailed.', '$tstamp')"); + } + else { + if($tstamp > $cchat_shld_tstamp) { + mysqli_query($conx, "UPDATE accounts SET chat_attack_hp='$cchat_attack_hp'-100 WHERE uid='$sadf_uid'"); + mysqli_query($conx, "UPDATE accounts SET funds='$u_funds'-10000 WHERE uid='$u_uid'"); + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username commited suicide. [HP: $new_cchat_attack_hp]', '$tstamp')"); + } + else { + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username attempted to commit suicide but they are currently shielded. B)', '$tstamp')"); + } + } + } + else { + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username attempted to commit suicide but they are already dead..', '$tstamp')"); + } +} +} +// Punch +if ($var[0] == '/p' && $var[1] && $u_funds >= '15' && $u_chatgames == 'yes') { + $post = "n"; + $sakfsajadfjl = $var[1]; + $sadfasdfas = mysqli_query($conx, "SELECT uid,username,chat_attack_hp,chat_shield_tstamp,jailed FROM accounts WHERE username='$sakfsajadfjl'"); + $sadfas = mysqli_fetch_assoc($sadfasdfas); + $sadf_uid = $sadfas['uid']; + $sadf_uname = $sadfas['username']; + $cchat_attack_hp = $sadfas['chat_attack_hp']; + $cchat_shld_tstamp = $sadfas['chat_shield_tstamp']; + $cchat_isjailed = $sadfas['jailed']; + $new_cchat_attack_hp = $cchat_attack_hp-1; + if($new_cchat_attack_hp <= 0) { + $new_cchat_attack_hp = "0"; + } + if($sadf_uid != '' && $sadf_uid != $u_uid) { + if($cchat_attack_hp > '0') { + if($cchat_isjailed == 'yes') { + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username attempted to punch @$sadf_uname but they are currently jailed.', '$tstamp')"); + } + else { + if($tstamp > $cchat_shld_tstamp) { + mysqli_query($conx, "UPDATE accounts SET chat_attack_hp='$cchat_attack_hp'-1 WHERE uid='$sadf_uid'"); + mysqli_query($conx, "UPDATE accounts SET funds='$u_funds'-15 WHERE uid='$u_uid'"); + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username punched @$sadf_uname. [HP: $new_cchat_attack_hp]', '$tstamp')"); + } + else { + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username attempted to punched @$sadf_uname but they are currently shielded. B)', '$tstamp')"); + } + } + } + else { + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username attempted to punched @$sadf_uname but they are already dead..', '$tstamp')"); + } +} +} +// stab +if ($var[0] == '/st' && $var[1] && $u_funds >= '30' && $u_chatgames == 'yes') { + $post = "n"; + $sakfsajadfjl = $var[1]; + $sadfasdfas = mysqli_query($conx, "SELECT uid,username,chat_attack_hp,chat_shield_tstamp,jailed FROM accounts WHERE username='$sakfsajadfjl'"); + $sadfas = mysqli_fetch_assoc($sadfasdfas); + $sadf_uid = $sadfas['uid']; + $sadf_uname = $sadfas['username']; + $cchat_attack_hp = $sadfas['chat_attack_hp']; + $cchat_shld_tstamp = $sadfas['chat_shield_tstamp']; + $cchat_isjailed = $sadfas['jailed']; + $new_cchat_attack_hp = $cchat_attack_hp-5; + if($new_cchat_attack_hp <= 0) { + $new_cchat_attack_hp = "0"; + } + if($sadf_uid != '' && $sadf_uid != $u_uid) { + if($cchat_attack_hp > '0') { + if($cchat_isjailed == 'yes') { + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username attempted to stab @$sadf_uname but they are currently jailed.', '$tstamp')"); + } + else { + if($tstamp > $cchat_shld_tstamp) { + mysqli_query($conx, "UPDATE accounts SET chat_attack_hp='$cchat_attack_hp'-5 WHERE uid='$sadf_uid'"); + mysqli_query($conx, "UPDATE accounts SET funds='$u_funds'-30 WHERE uid='$u_uid'"); + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username stabbed @$sadf_uname. [HP: $new_cchat_attack_hp]', '$tstamp')"); + } + else { + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username attempted to stabbed @$sadf_uname but they are currently shielded. B)', '$tstamp')"); + } + } + } + else { + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username attempted to stabbed @$sadf_uname but they are already dead..', '$tstamp')"); + } +} +} +// BREAK SHIELD +if ($var[0] == '/bs' && $var[1] && $u_funds >= '1000' && $u_chatgames == 'yes') { + $post = "n"; + $sakfsajadfjl = $var[1]; + $sadfasdfas = mysqli_query($conx, "SELECT uid,username,chat_attack_hp,chat_shield_tstamp,jailed FROM accounts WHERE username='$sakfsajadfjl'"); + $sadfas = mysqli_fetch_assoc($sadfasdfas); + $sadf_uid = $sadfas['uid']; + $sadf_uname = $sadfas['username']; + $cchat_attack_hp = $sadfas['chat_attack_hp']; + $cchat_shld_tstamp = $sadfas['chat_shield_tstamp']; + $cchat_isjailed = $sadfas['jailed']; + $new_cchat_attack_hp = $cchat_attack_hp-10; + if($new_cchat_attack_hp <= 0) { + $new_cchat_attack_hp = "0"; + } + if($sadf_uid != '' && $sadf_uid != $u_uid) { + if($cchat_attack_hp > '0') { + if($cchat_isjailed == 'yes') { + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username attempted to break the shield of @$sadf_uname but they are currently jailed.', '$tstamp')"); + } + else { + if($tstamp < $cchat_shld_tstamp) { + mysqli_query($conx, "UPDATE accounts SET chat_shield_tstamp='0' WHERE uid='$sadf_uid'"); + mysqli_query($conx, "UPDATE accounts SET funds='$u_funds'-1000 WHERE uid='$u_uid'"); + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username broke the shield of @$sadf_uname.', '$tstamp')"); +} +else { + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } +mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username attempted to break the shield of @$sadf_uname but they are not currently shielded.', '$tstamp')"); +} + } + } + else { + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username attempted to break the shield of @$sadf_uname but they are currently dead..', '$tstamp')"); + } +} +} +// CHAT ATTACK +// CHAT ATTACK +// CHAT ATTACK +// CHAT ATTACK +// CHAT ATTACK +// CHAT ATTACK +// CHAT ATTACK +// CHAT ATTACK +// CHAT ATTACK +// CHAT ATTACK +// CHAT ATTACK +// CHAT ATTACK +if($var[0] == '/disable' && $var[1] == 'games' && $var[2] && $u_cont_mang == 'yes') { + $varu = $var[2]; + $cgtq = mysqli_query($conx, "SELECT uid,username FROM accounts WHERE username='$varu'"); + $cgtr = mysqli_fetch_assoc($cgtq); + $uidg = $cgtr['uid']; + $unameg = $cgtr['username']; + // + // NEW: LOUNGE LOG + // KEEP STAFF UNDER CONTROL AND MAKE SURE THEY ARE BEHAVING + // + $lounge_tstamp = time(); + $lounge_comments = "disabled chat games in chat"; + $lounge_action = "chatgme_dis"; + mysqli_query($conx, "INSERT INTO lounge_log (uid, uid_affected, action, comments, tstamp) VALUES ('$u_uid','$uidg','$lounge_action','$lounge_comments','$lounge_tstamp')"); + // + // NEW: LOUNGE LOG + // KEEP STAFF UNDER CONTROL AND MAKE SURE THEY ARE BEHAVING + // + if($unameg != '') { + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $dis_pmuid = $disr['pmuid']; + $msgtype = $disr['msgtype']; + if($dis_uid == '6') { + if($msgtype != 'pm') { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + } + mysqli_query($conx, "UPDATE accounts SET chat_games='no' WHERE uid='$uidg'"); + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', 'Chat games have been disabled for $unameg.', '$tstamp')"); + $post = "n"; + } +} + +if($var[0] == '/enable' && $var[1] == 'games' && $var[2] && $u_cont_mang == 'yes') { + $varu = $var[2]; + $cgtq = mysqli_query($conx, "SELECT uid,username FROM accounts WHERE username='$varu'"); + $cgtr = mysqli_fetch_assoc($cgtq); + $uidg = $cgtr['uid']; + $unameg = $cgtr['username']; + // + // NEW: LOUNGE LOG + // KEEP STAFF UNDER CONTROL AND MAKE SURE THEY ARE BEHAVING + // + $lounge_tstamp = time(); + $lounge_comments = "enabled chat games in chat"; + $lounge_action = "chatgme_enbl"; + mysqli_query($conx, "INSERT INTO lounge_log (uid, uid_affected, action, comments, tstamp) VALUES ('$u_uid','$uidg','$lounge_action','$lounge_comments','$lounge_tstamp')"); + // + // NEW: LOUNGE LOG + // KEEP STAFF UNDER CONTROL AND MAKE SURE THEY ARE BEHAVING + // + if($unameg != '') { + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $dis_pmuid = $disr['pmuid']; + $msgtype = $disr['msgtype']; + if($dis_uid == '6') { + if($msgtype != 'pm') { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + } + mysqli_query($conx, "UPDATE accounts SET chat_games='yes' WHERE uid='$uidg'"); + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', 'Chat games have been enabled for $unameg.', '$tstamp')"); + $post = "n"; + } +} + + + + + +$cgggs = mysqli_query($conx, "SELECT * FROM chat_games WHERE game_uqid='active_online' ORDER BY id DESC LIMIT 1"); +$cggrr = mysqli_fetch_assoc($cgggs); +$free_id = $cggrr['id']; +$free_left = $cggrr['msgs_since']; +if ($var[0] == '/csplit' && $var[1] == 'easter' && $u_csplown == 'no' && $free_left > 0) { + mysqli_query($conx, "UPDATE accounts SET csplit_own='yes' WHERE uid='$u_uid'"); + mysqli_query($conx, "UPDATE chat_games SET msgs_since='$free_left'-1 WHERE id='$free_id'"); + mysqli_query($conx, "UPDATE user_theme_colors SET csplit1_name='$u_username' WHERE uid='$u_uid' && theme_id='1'"); + mysqli_query($conx, "UPDATE user_theme_colors SET csplit1_name='$u_username' WHERE uid='$u_uid' && theme_id='2'"); + mysqli_query($conx, "UPDATE user_theme_colors SET csplit1_name='$u_username' WHERE uid='$u_uid' && theme_id='3'"); + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username has just been gifted cSplit! B) Happy Easter! Tap your username in the chat to use cSplit. It is not available yet on the DS mode.', '$tstamp')"); + $post = "n"; +} + + + + + + + + + +if ($var[0] == '/cspl' && $var[1] == 'buy' && $var[2] == $u_username && $u_cmsgs >= 10 && $u_funds >= 5 && $u_csplown == 'no') { + mysqli_query($conx, "UPDATE accounts SET csplit_own='yes' WHERE uid='$u_uid'"); + mysqli_query($conx, "UPDATE accounts SET funds='$u_funds'-5 WHERE uid='$u_uid'"); + mysqli_query($conx, "UPDATE user_theme_colors SET csplit1_name='$u_username' WHERE uid='$u_uid' && theme_id='1'"); + mysqli_query($conx, "UPDATE user_theme_colors SET csplit1_name='$u_username' WHERE uid='$u_uid' && theme_id='2'"); + mysqli_query($conx, "UPDATE user_theme_colors SET csplit1_name='$u_username' WHERE uid='$u_uid' && theme_id='3'"); + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username has just purchased cSplit. Refresh the page and click your username above a message in Chat.', '$tstamp')"); + $post = "n"; +} + +if ($var[0] == '/milk' && $var[1] == 'cow' && $u_funds >= '10' && $u_chatgames == 'yes') { + $chatgames = mysqli_query($conx, "SELECT * FROM chat_games WHERE game_uqid='milk_cow'"); + $cgr = mysqli_fetch_assoc($chatgames); + $cg_tstamp = $cgr['tstamp']; + $cg_msince = $cgr['msgs_since']; + + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $dis_pmuid = $disr['pmuid']; + $msgtype = $disr['msgtype']; + if($dis_uid == '6') { + if($msgtype != 'pm') { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + } + +if($cg_msince >= 10) { + //$milkcow_amnt = $cg_msince-10; + $milkcow_amnt = rand(1,1000); + mysqli_query($conx, "UPDATE accounts SET funds='$u_funds'+$milkcow_amnt WHERE uid='$u_uid'"); + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp, display_name) VALUES ('6', '@$u_username has milked the cow! +$milkcow_amnt MDF', '$tstamp','no')"); + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', ':cow-gif:', '$tstamp')"); + mysqli_query($conx, "UPDATE chat_games SET uid='$u_uid' WHERE game_uqid='milk_cow'"); + $milkstamp = $tstamp + 3600; + mysqli_query($conx, "UPDATE chat_games SET tstamp='$milkstamp' WHERE game_uqid='milk_cow'"); + mysqli_query($conx, "UPDATE chat_games SET msgs_since='0' WHERE game_uqid='milk_cow'"); +} +else { + mysqli_query($conx, "UPDATE accounts SET funds='$u_funds'-10 WHERE uid='$u_uid'"); + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username has failed to milk the cow! 10 messages have not been sent since the last time, only $cg_msince have been sent! -10.00 MDF :angry_red:', '$tstamp')"); +} +$post = "n"; +} + + + + + + + + + + + + +/* + +if ($var[0] == '/egg' && $var[1] == 'hunt' && $u_chatgames == 'yes') { + $chatgames = mysqli_query($conx, "SELECT * FROM chat_games WHERE game_uqid='egg_hunt'"); + $cgr = mysqli_fetch_assoc($chatgames); + $cg_tstamp = $cgr['tstamp']; + $cg_msince = $cgr['msgs_since']; + $cg_prezzy = $cgr['prize']; + + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $dis_pmuid = $disr['pmuid']; + $msgtype = $disr['msgtype']; + if($dis_uid == '6') { + if($msgtype != 'pm') { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + } + +if($cg_msince >= 8) { + $milkcow_amnt = $cg_msince-10; + mysqli_query($conx, "UPDATE accounts SET funds='$u_funds'+$cg_prezzy WHERE uid='$u_uid'"); + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp, display_name) VALUES ('6', '@$u_username found an egg! B) There was +$cg_prezzy MDF inside. :drool:', '$tstamp','no')"); + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', ':easter-gif:', '$tstamp')"); + mysqli_query($conx, "UPDATE chat_games SET uid='$u_uid' WHERE game_uqid='egg_hunt'"); + $milkstamp = $tstamp + 3600; + mysqli_query($conx, "UPDATE chat_games SET tstamp='$milkstamp' WHERE game_uqid='egg_hunt'"); + $egg_prize_rand = rand(250,10000); + mysqli_query($conx, "UPDATE chat_games SET prize='$egg_prize_rand' WHERE game_uqid='egg_hunt'"); + mysqli_query($conx, "UPDATE chat_games SET msgs_since='0' WHERE game_uqid='egg_hunt'"); +} +else { + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username went searching for eggs but came back empty handed. :tear: Maybe try again after more messages have been sent? B)', '$tstamp')"); +} +$post = "n"; +} +*/ + + + + + + + + + + + +if ($var[0] == '/pm' && $var[1] && $var[2]) { + $var1 = $var[1]; + $jtest = mysqli_query($conx, "SELECT uid FROM accounts WHERE username='$var1'"); + $ohlmao = mysqli_fetch_assoc($jtest); + $uidofusername = $ohlmao['uid']; + if($uidofusername && $uidofusername != $u_uid) { + $string = explode (' ', $chat_txt, 3); + $string = $string[2]; + $disq = mysqli_query($conx, "SELECT id,uid,pmuid FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $dis_pmuid = $disr['pmuid']; + + if($dis_uid == $u_uid && $dis_pmuid == $uidofusername) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + // update online time + mysqli_query($conx, "UPDATE accounts SET chat_time='$tstamp' WHERE uid='$u_uid'"); + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp, pmuid, msgtype) VALUES ('$u_uid', '$string', '$tstamp', '$uidofusername', 'pm')"); + $post = "n"; + } +} +?> diff --git a/chat/csplit_box.php b/chat/csplit_box.php new file mode 100644 index 0000000..1cd7282 --- /dev/null +++ b/chat/csplit_box.php @@ -0,0 +1,94 @@ + + no changes detected + + + + + + + + + + + + + + +
+ cSplit Configuration +
+ The splitting of your username must be exactly the same as your username. It is case sensitive. +
+ $u_cspname1$u_cspname2$u_cspname3 + to + $u_cspname1$u_cspname2$u_cspname3 +
+ Username Coloration +
+
+
+ Username Splitting +
+
+
+
+ + + + + +
+
Update
+
+
Disable
+

"; +} +elseif($u_csplown == 'yes' && $u_csplit == 'off') { + echo " + + + + + +
+ cSplit +
+ You own cSplit, but it is currently disabled for your account. You can enable it below. +
+ + + + +
+
Enable
+

"; +} +elseif($u_csplown == 'no') { + $u_totalc = number_format($u_cmsgs); + echo " + + + + + +
+ cSplit +
+ This feature is available only to users who have sent a total of 10 chat messages. So far, you have sent $u_totalc. Once you have reached that limit, you will be able to purchase cSplit for 5.00 MDF using the command below. Remember, spamming or flooding to meet this limit is against the rules. +
+ + + + +
+
/cspl buy $u_username
+

"; +} +?> diff --git a/chat/dark.php b/chat/dark.php new file mode 100644 index 0000000..81f79dc --- /dev/null +++ b/chat/dark.php @@ -0,0 +1,628 @@ + + + + + Chat+ | Misdew.com + + + + + + + "; + } + if($css_type == "raw") { + echo ""; + } + ?> + + + + + + +
+ +
"; + if($u_csplown == 'yes' && $u_csplit == 'on') { + echo "
+ no changes detected +
+ + + + + + + + + + + + + +
+ cSplit Configuration +
+ The splitting of your username must be exactly the same as your username. It is case sensitive. +
+ $u_cspname1$u_cspname2$u_cspname3 + to + $u_cspname1$u_cspname2$u_cspname3 +
+ Username Coloration +
+
+
+ Username Splitting +
+
+
+
+ + + + + +
+
Update
+
+
Disable
+

"; + } + elseif($u_csplown == 'yes' && $u_csplit == 'off') { + echo " + + + + + +
+ cSplit +
+ You own cSplit, but it is currently disabled for your account. You can enable it below. +
+ + + + +
+
Enable
+

"; + } + elseif($u_csplown == 'no') { + $u_totalc = number_format($u_cmsgs); + echo " + + + + + +
+ cSplit +
+ This feature is available only to users who have sent a total of 1,000 chat messages. So far, you have sent $u_totalc. Once you have reached that limit, you will be able to purchase cSplit for $5.00 using the command below. Remember, spamming or flooding to meet this limit is against the rules. +
+ + + + +
+
/cspl buy $u_username
+

"; + } + echo "
"; + ?> +
+
+ + + + +
+
+ + +
+   +
+ + + +
+ +
+ + + +
+ "; + echo "Chat is not private or secure. Your messages and PMs can/may be read at any time.
They are stored in plaintext on our server.
"; + require_once("../inc/footer.php"); + ?> +
+ + diff --git a/chat/img_upload.php b/chat/img_upload.php new file mode 100644 index 0000000..0f27494 --- /dev/null +++ b/chat/img_upload.php @@ -0,0 +1,56 @@ + base64_encode($data), + 'key' => urlencode($required_key), + 'user' => urlencode($u_uid), + 'imagetype' => urlencode($u_uid), + 'imaeg' => urlencode($u_cloudterms), + 'fieltyp' => urlencode($u_cloudterms), + 'usernaem' => urlencode($u_username), + 'filextension' => urlencode($u_username), + 'uvia' => urlencode($uploc) + ); + $curl = curl_init(); + curl_setopt($curl, CURLOPT_URL, 'https://upl.justa.us/image-direct.php'); + curl_setopt($curl, CURLOPT_TIMEOUT, 30); + curl_setopt($curl, CURLOPT_POST, 1); + curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($curl, CURLOPT_POSTFIELDS, $POST_DATA); + $url = curl_exec($curl); + $url_comp = substr($url, 19); + $comp_url = "http://misdew-ds.com/$url_comp"; + if($url!=""){ + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $dis_pmuid = $disr['pmuid']; + $msgtype = $disr['msgtype']; + if($dis_uid == $u_uid) { + if($msgtype != 'pm') { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp, mtype, imgurl, comp_imgurl) VALUES ('$u_uid', '$url', '$tstamp','img','$url','$comp_url')"); + echo $url; + } + else { + // there was an error uploading the image + } + curl_close ($curl); +} + + + +?> diff --git a/chat/index.php b/chat/index.php index 8b13789..606139c 100644 --- a/chat/index.php +++ b/chat/index.php @@ -1 +1,572 @@ + + + + + Chat+ | Misdew.com + + + + + + + "; + } + if($css_type == "raw") { + echo ""; + } + ?> + + + + + +
+ +
"; + if($u_csplown == 'yes' && $u_csplit == 'on') { + echo "
+ no changes detected +
+ + + + + + + + + + + + + +
+ cSplit Configuration +
+ The splitting of your username must be exactly the same as your username. It is case sensitive. +
+ $u_cspname1$u_cspname2$u_cspname3 + to + $u_cspname1$u_cspname2$u_cspname3 +
+ Username Coloration +
+
+
+ Username Splitting +
+
+
+
+ + + + + +
+
Update
+
+
Disable
+

"; + } + elseif($u_csplown == 'yes' && $u_csplit == 'off') { + echo " + + + + + +
+ cSplit +
+ You own cSplit, but it is currently disabled for your account. You can enable it below. +
+ + + + +
+
Enable
+

"; + } + elseif($u_csplown == 'no') { + $u_totalc = number_format($u_cmsgs); + echo " + + + + + +
+ cSplit +
+ This feature is available only to users who have sent a total of 1,000 chat messages. So far, you have sent $u_totalc. Once you have reached that limit, you will be able to purchase cSplit for $5.00 using the command below. Remember, spamming or flooding to meet this limit is against the rules. +
+ + + + +
+
/cspl buy $u_username
+

"; + } + echo "
"; + ?> +
+
+ + + + +
+
+ + +
+   +
+ + + +
+ +
+ + + +
+ "; + echo "Chat is not private or secure. Your messages and PMs can/may be read at any time.
They are stored in plaintext on our server.
"; + require_once("../inc/footer.php"); + ?> +
+ + diff --git a/chat/messages-dark.php b/chat/messages-dark.php new file mode 100644 index 0000000..c44daec --- /dev/null +++ b/chat/messages-dark.php @@ -0,0 +1,325 @@ +Current rate per message: +$chat_msg_per_rate MDF - don't spam"; + + +$new = $tstamp - 60; +// if active, display them +$sc_onl = mysqli_query($conx, "SELECT username FROM accounts WHERE chat_time >= $new && chat_istyping='yes' ORDER BY username"); +$l_cnt = mysqli_num_rows($sc_onl); +$onlci = mysqli_query($conx, "SELECT tstamp FROM chat ORDER BY id DESC LIMIT 1"); +$cironl = mysqli_fetch_assoc($onlci); +$chatac = $cironl['tstamp']; +// selects user accounts +$slct_onl = mysqli_query($conx, "SELECT chat_istyping,uid,username,chat_time,chat_attack_hp,chat_shield_tstamp,md_verf FROM accounts ORDER BY username"); +$separator = ''; + +while($slc_on = mysqli_fetch_array($slct_onl)) + { +$online_username = $slc_on['username']; +$online_uid = $slc_on['uid']; +$online_time = $slc_on['chat_time']; +$online_verf = $slc_on['md_verf']; +$online_typing = $slc_on['chat_istyping']; +$on_chat_attack_hp = $slc_on['chat_attack_hp']; + $on_chat_shield_tstamp = $slc_on['chat_shield_tstamp']; +$usrif_q = mysqli_query($conx, "SELECT username_color,text_color FROM user_theme_colors WHERE uid='$online_uid' && theme_id='$g_themeid'"); +while($usrif_r = mysqli_fetch_assoc($usrif_q)) { + $cusername_color = $usrif_r['username_color']; + $cchat_tcolor = $usrif_r['text_color']; +} +// math stuff for time ago function +$differ = time() - $online_time; +$mins = round($differ / 60); + +if ($mins <= 1 && $online_typing == 'yes') { + echo "$separator"; + echo "$online_username"; + if (!$separator) $separator = ', '; +} +} +if($l_cnt == 1) { + echo " is typing..."; +} +elseif($l_cnt >= 2) { + echo " are typing..."; +} +else { + +} + +$chat_q = mysqli_query($conx, "SELECT id,uid,tstamp,message,pmuid,msgtype,display_name,mtype,imgurl,telegram FROM chat ORDER BY id DESC LIMIT 35"); +while($chat_r = mysqli_fetch_assoc($chat_q)) { + $chat_id = $chat_r['id']; + $chat_uid = $chat_r['uid']; + $chat_tstamp = $chat_r['tstamp']; + $string = $chat_r['message']; + $pmuid = $chat_r['pmuid']; + $msg_type = $chat_r['msgtype']; + $displayname = $chat_r['display_name']; + $mtype = $chat_r['mtype']; + $c_imgurl = $chat_r['imgurl']; + $sent_telegram = $chat_r['telegram']; + // ************************ // + // *** BLOCKING SYSTEM *** // + // ************************ // + $blks = mysqli_query($conx, "SELECT blocked_uid FROM blocking WHERE uid='$u_uid' && blocked_uid='$chat_uid'"); + $blkc = mysqli_num_rows($blks); + if($blkc > 0) { + $chat_uid = "286"; + } + $blks = mysqli_query($conx, "SELECT blocked_uid FROM blocking WHERE blocked_uid='$u_uid' && uid='$chat_uid'"); + $blkc = mysqli_num_rows($blks); + if($blkc > 0) { + $chat_uid = "286"; + } + // ************************ // + // *** BLOCKING SYSTEM *** // + // ************************ // + if($chat_uid != '286') { + include("../inc/replace.php"); + $usr_q = mysqli_query($conx, "SELECT username,csplit,sticker,md_verf FROM accounts WHERE uid='$chat_uid'"); + while($usr_r = mysqli_fetch_assoc($usr_q)) { + $chat_username = $usr_r['username']; + $chat_sticker = $usr_r['sticker']; + $chat_csplit = $usr_r['csplit']; + $chat_md_verf = $usr_r['md_verf']; + if($chat_md_verf == 'yes') { + $verif_check = " "; + } + else { + $verif_check = ""; + } + $usri_q = mysqli_query($conx, "SELECT * FROM user_theme_colors WHERE uid='$chat_uid' && theme_id='$g_themeid'"); + while($usri_r = mysqli_fetch_assoc($usri_q)) { + $username_color = "#4c4c4c"; + $chat_tcolor = "#4c4c4c"; + $csplit1_color = "#4c4c4c"; + $csplit2_color = "#4c4c4c"; + $csplit3_color = "#4c4c4c"; + $csplit1_name = $usri_r['csplit1_name']; + $csplit2_name = $usri_r['csplit2_name']; + $csplit3_name = $usri_r['csplit3_name']; + } + } + // whisper data + $usr_qq = mysqli_query($conx, "SELECT username,csplit,sticker,md_verf FROM accounts WHERE uid='$pmuid'"); + while($usr_rr = mysqli_fetch_assoc($usr_qq)) { + $chat_usernamer = $usr_rr['username']; + $chat_csplitt = $usr_rr['csplit']; + $chat_stickerr = $usr_rr['sticker']; + $chat_md_verffffff = $usr_rr['md_verf']; + if($chat_md_verffffff == 'yes') { + $verif_checkkkkk = " "; + } + else { + $verif_checkkkkk = ""; + } + $usri_qq = mysqli_query($conx, "SELECT * FROM user_theme_colors WHERE uid='$pmuid' && theme_id='$g_themeid'"); + while($usri_rr = mysqli_fetch_assoc($usri_qq)) { + $username_colorr = "#4c4c4c"; + $chat_tcolorr = "#4c4c4c"; + $csplit1_colorr = "#4c4c4c"; + $csplit2_colorr = "#4c4c4c"; + $csplit3_colorr = "#4c4c4c"; + $csplit1_namee = $usri_rr['csplit1_name']; + $csplit2_namee = $usri_rr['csplit2_name']; + $csplit3_namee = $usri_rr['csplit3_name']; + } + } +/* vvv IF THE CHAT MESSAGE TYPE IS A WHISPER vvvv */ + if($msg_type == 'pm') { + if($chat_username == $u_username) { + if($chat_csplitt == 'on') { + if($chat_stickerr != '') { + $whisper_stickerr = "\"\""; + } + if($chat_sticker != '') { + $whisper_sticker = "\"\""; + } + $tochat_usernamer = " $csplit1_namee$csplit2_namee$csplit3_namee $verif_checkkkkk $whisper_stickerr"; + } + else { + $tochat_usernamer = " $chat_usernamer \"\"$verif_checkkkkk"; + } + if($chat_stickerr != '') { + $whisper_stickerr = "\"\""; + } + if($chat_sticker != '') { + $whisper_sticker = "\"\" "; + } + if($displayname == 'no') { + $chat_username = ""; + $tochat_usernamer = ""; + $csplit1_name = ""; + $csplit2_name = ""; + $csplit3_name = ""; + $whisper_sticker = ""; + $whisper_stickerr = ""; + $verif_checkkkkk = ""; + $verif_check = ""; + } + echo "
+
"; + if($chat_csplit == 'on') { + echo "$whisper_sticker$verif_check$csplit1_name$csplit2_name$csplit3_name"; + } + else { + echo "$whisper_sticker$verif_check$chat_username"; + } + echo " $tochat_usernamer
+
" . $string . "
+
sent "; echo timeago($chat_tstamp); echo " ago"; if($sent_telegram == 'yes') { echo " via Telegram";} echo"
+
"; + } + elseif($pmuid == $u_uid) { + if($chat_csplit == 'on') { + $chat_username_cspl = "\"\" $csplit1_name$csplit2_name$csplit3_name"; + } + else { + $chat_username_cspl = "\"\" $chat_username"; + } + $fromchatr_usernamer = "$chat_username_cspl $verif_check "; + if($displayname == 'no') { + $chat_username = ""; + $fromchatr_usernamer = ""; + } + echo "
+
$fromchatr_usernamer
+
" . $string . "
+
sent "; echo timeago($chat_tstamp); echo " ago"; if($sent_telegram == 'yes') { echo " via Telegram";} echo"
+
"; + } + } +/* ^^^ IF THE CHAT MESSAGE TYPE IS A WHISPER ^^^ */ +/* #################################################### */ +/* vvv IF THE CHAT MESSAGE IS NORMAL vvvv */ + else { + if($chat_username == $u_username) { + if($displayname == 'no') { + $chat_username = ""; + $csplit1_name = ""; + $csplit2_name = ""; + $csplit3_name = ""; + $verif_check = ""; + } + echo "
"; + if($chat_csplit == 'on') { + echo $verif_check; + echo "$csplit1_name$csplit2_name$csplit3_name"; + if($chat_sticker != '' && $displayname != 'no') { + echo " \"\""; + } + } + else { + echo $verif_check; + echo $chat_username; + if($chat_sticker != '' && $displayname != 'no') { + echo " \"\""; + } + } + echo "
"; + // if message is an image + if($mtype == 'img') { + // + // Data Saver + if($u_datasaver == 'on') { + echo "
[view image]
"; + } + else { + echo "
\"\"
"; + } + // Data Saver + // + } + // if message is normal + else { + echo "
" . $string . "
"; + } + echo ""; + if($mtype == 'img') { + echo "
view image
"; + echo "sent "; echo timeago($chat_tstamp); echo " ago"; if($sent_telegram == 'yes') { echo " via Telegram";} echo"
"; + } + else { + echo "sent "; echo timeago($chat_tstamp); echo " ago"; if($sent_telegram == 'yes') { echo " via Telegram";} echo""; + } + } + else { + if($displayname == 'no') { + $chat_username = ""; + $csplit1_name = ""; + $csplit2_name = ""; + $csplit3_name = ""; + $verif_check = ""; + } + echo "
"; + if($chat_csplit == 'on') { + if($chat_sticker != '' && $displayname != 'no') { + echo "\"\" "; + } + echo "$csplit1_name$csplit2_name$csplit3_name"; + } + else { + if($chat_sticker != '' && $displayname != 'no') { + echo "\"\" "; + } + echo $chat_username; + } + echo " " . $verif_check; + echo "
"; + // if message is an image + if($mtype == 'img') { + // + // Data Saver + if($u_datasaver == 'on') { + echo "
[view image]
"; + } + else { + echo "
\"\"
"; + } + // Data Saver + // + } + // if message is normal + else { + echo "
" . $string . "
"; + } + echo ""; + if($mtype == 'img') { + echo "
view image
"; + echo "sent "; echo timeago($chat_tstamp); echo " ago"; if($sent_telegram == 'yes') { echo " via Telegram";} echo"
"; + } + else { + echo "sent "; echo timeago($chat_tstamp); echo " ago"; if($sent_telegram == 'yes') { echo " via Telegram";} echo""; + } + } + } +/* ^^^ IF THE CHAT MESSAGE TYPE IS NORMAL ^^^ */ +} +} +?> + diff --git a/chat/messages.php b/chat/messages.php new file mode 100644 index 0000000..17fc773 --- /dev/null +++ b/chat/messages.php @@ -0,0 +1,324 @@ +Current rate per message: +$chat_msg_per_rate MDF - don't spam"; + +$new = $tstamp - 60; +// if active, display them +$sc_onl = mysqli_query($conx, "SELECT username FROM accounts WHERE chat_time >= $new && chat_istyping='yes' ORDER BY username"); +$l_cnt = mysqli_num_rows($sc_onl); +$onlci = mysqli_query($conx, "SELECT tstamp FROM chat ORDER BY id DESC LIMIT 1"); +$cironl = mysqli_fetch_assoc($onlci); +$chatac = $cironl['tstamp']; +// selects user accounts +$slct_onl = mysqli_query($conx, "SELECT chat_istyping,uid,username,chat_time,chat_attack_hp,chat_shield_tstamp,md_verf FROM accounts ORDER BY username"); +$separator = ''; + +while($slc_on = mysqli_fetch_array($slct_onl)) + { +$online_username = $slc_on['username']; +$online_uid = $slc_on['uid']; +$online_time = $slc_on['chat_time']; +$online_verf = $slc_on['md_verf']; +$online_typing = $slc_on['chat_istyping']; +$on_chat_attack_hp = $slc_on['chat_attack_hp']; + $on_chat_shield_tstamp = $slc_on['chat_shield_tstamp']; +$usrif_q = mysqli_query($conx, "SELECT username_color,text_color FROM user_theme_colors WHERE uid='$online_uid' && theme_id='$g_themeid'"); +while($usrif_r = mysqli_fetch_assoc($usrif_q)) { + $cusername_color = $usrif_r['username_color']; + $cchat_tcolor = $usrif_r['text_color']; +} +// math stuff for time ago function +$differ = time() - $online_time; +$mins = round($differ / 60); + +if ($mins <= 1 && $online_typing == 'yes') { + echo "$separator"; + echo "$online_username"; + if (!$separator) $separator = ', '; +} +} +if($l_cnt == 1) { + echo " is typing..."; +} +elseif($l_cnt >= 2) { + echo " are typing..."; +} +else { + +} + +$chat_q = mysqli_query($conx, "SELECT id,uid,tstamp,message,pmuid,msgtype,display_name,mtype,imgurl,telegram FROM chat ORDER BY id DESC LIMIT 35"); +while($chat_r = mysqli_fetch_assoc($chat_q)) { + $chat_id = $chat_r['id']; + $chat_uid = $chat_r['uid']; + $chat_tstamp = $chat_r['tstamp']; + $string = $chat_r['message']; + $pmuid = $chat_r['pmuid']; + $msg_type = $chat_r['msgtype']; + $displayname = $chat_r['display_name']; + $mtype = $chat_r['mtype']; + $c_imgurl = $chat_r['imgurl']; + $sent_telegram = $chat_r['telegram']; + // ************************ // + // *** BLOCKING SYSTEM *** // + // ************************ // + $blks = mysqli_query($conx, "SELECT blocked_uid FROM blocking WHERE uid='$u_uid' && blocked_uid='$chat_uid'"); + $blkc = mysqli_num_rows($blks); + if($blkc > 0) { + $chat_uid = "286"; + } + $blks = mysqli_query($conx, "SELECT blocked_uid FROM blocking WHERE blocked_uid='$u_uid' && uid='$chat_uid'"); + $blkc = mysqli_num_rows($blks); + if($blkc > 0) { + $chat_uid = "286"; + } + // ************************ // + // *** BLOCKING SYSTEM *** // + // ************************ // + if($chat_uid != '286') { + include("../inc/replace.php"); + $usr_q = mysqli_query($conx, "SELECT username,csplit,sticker,md_verf FROM accounts WHERE uid='$chat_uid'"); + while($usr_r = mysqli_fetch_assoc($usr_q)) { + $chat_username = $usr_r['username']; + $chat_sticker = $usr_r['sticker']; + $chat_csplit = $usr_r['csplit']; + $chat_md_verf = $usr_r['md_verf']; + if($chat_md_verf == 'yes') { + $verif_check = " "; + } + else { + $verif_check = ""; + } + $usri_q = mysqli_query($conx, "SELECT * FROM user_theme_colors WHERE uid='$chat_uid' && theme_id='$g_themeid'"); + while($usri_r = mysqli_fetch_assoc($usri_q)) { + $username_color = $usri_r['username_color']; + $chat_tcolor = $usri_r['text_color']; + $csplit1_color = $usri_r['csplit1_color']; + $csplit2_color = $usri_r['csplit2_color']; + $csplit3_color = $usri_r['csplit3_color']; + $csplit1_name = $usri_r['csplit1_name']; + $csplit2_name = $usri_r['csplit2_name']; + $csplit3_name = $usri_r['csplit3_name']; + } + } + // whisper data + $usr_qq = mysqli_query($conx, "SELECT username,csplit,sticker,md_verf FROM accounts WHERE uid='$pmuid'"); + while($usr_rr = mysqli_fetch_assoc($usr_qq)) { + $chat_usernamer = $usr_rr['username']; + $chat_csplitt = $usr_rr['csplit']; + $chat_stickerr = $usr_rr['sticker']; + $chat_md_verffffff = $usr_rr['md_verf']; + if($chat_md_verffffff == 'yes') { + $verif_checkkkkk = " "; + } + else { + $verif_checkkkkk = ""; + } + $usri_qq = mysqli_query($conx, "SELECT * FROM user_theme_colors WHERE uid='$pmuid' && theme_id='$g_themeid'"); + while($usri_rr = mysqli_fetch_assoc($usri_qq)) { + $username_colorr = $usri_rr['username_color']; + $chat_tcolorr = $usri_rr['text_color']; + $csplit1_colorr = $usri_rr['csplit1_color']; + $csplit2_colorr = $usri_rr['csplit2_color']; + $csplit3_colorr = $usri_rr['csplit3_color']; + $csplit1_namee = $usri_rr['csplit1_name']; + $csplit2_namee = $usri_rr['csplit2_name']; + $csplit3_namee = $usri_rr['csplit3_name']; + } + } +/* vvv IF THE CHAT MESSAGE TYPE IS A WHISPER vvvv */ + if($msg_type == 'pm') { + if($chat_username == $u_username) { + if($chat_csplitt == 'on') { + if($chat_stickerr != '') { + $whisper_stickerr = "\"\""; + } + if($chat_sticker != '') { + $whisper_sticker = "\"\""; + } + $tochat_usernamer = " $csplit1_namee$csplit2_namee$csplit3_namee $verif_checkkkkk $whisper_stickerr"; + } + else { + $tochat_usernamer = " $chat_usernamer \"\"$verif_checkkkkk"; + } + if($chat_stickerr != '') { + $whisper_stickerr = "\"\""; + } + if($chat_sticker != '') { + $whisper_sticker = "\"\" "; + } + if($displayname == 'no') { + $chat_username = ""; + $tochat_usernamer = ""; + $csplit1_name = ""; + $csplit2_name = ""; + $csplit3_name = ""; + $whisper_sticker = ""; + $whisper_stickerr = ""; + $verif_checkkkkk = ""; + $verif_check = ""; + } + echo "
+
"; + if($chat_csplit == 'on') { + echo "$whisper_sticker$verif_check$csplit1_name$csplit2_name$csplit3_name"; + } + else { + echo "$whisper_sticker$verif_check$chat_username"; + } + echo " $tochat_usernamer
+
" . $string . "
+
sent "; echo timeago($chat_tstamp); echo " ago"; if($sent_telegram == 'yes') { echo " via Telegram";} echo"
+
"; + } + elseif($pmuid == $u_uid) { + if($chat_csplit == 'on') { + $chat_username_cspl = "\"\" $csplit1_name$csplit2_name$csplit3_name"; + } + else { + $chat_username_cspl = "\"\" $chat_username"; + } + $fromchatr_usernamer = "$chat_username_cspl $verif_check "; + if($displayname == 'no') { + $chat_username = ""; + $fromchatr_usernamer = ""; + } + echo "
+
$fromchatr_usernamer
+
" . $string . "
+
sent "; echo timeago($chat_tstamp); echo " ago"; if($sent_telegram == 'yes') { echo " via Telegram";} echo"
+
"; + } + } +/* ^^^ IF THE CHAT MESSAGE TYPE IS A WHISPER ^^^ */ +/* #################################################### */ +/* vvv IF THE CHAT MESSAGE IS NORMAL vvvv */ + else { + if($chat_username == $u_username) { + if($displayname == 'no') { + $chat_username = ""; + $csplit1_name = ""; + $csplit2_name = ""; + $csplit3_name = ""; + $verif_check = ""; + } + echo "
"; + if($chat_csplit == 'on') { + echo $verif_check; + echo "$csplit1_name$csplit2_name$csplit3_name"; + if($chat_sticker != '' && $displayname != 'no') { + echo " \"\""; + } + } + else { + echo $verif_check; + echo $chat_username; + if($chat_sticker != '' && $displayname != 'no') { + echo " \"\""; + } + } + echo "
"; + // if message is an image + if($mtype == 'img') { + // + // Data Saver + if($u_datasaver == 'on') { + echo "
[view image]
"; + } + else { + echo "
\"\"
"; + } + // Data Saver + // + } + // if message is normal + else { + echo "
" . $string . "
"; + } + echo ""; + if($mtype == 'img') { + echo "
view image
"; + echo "sent "; echo timeago($chat_tstamp); echo " ago"; if($sent_telegram == 'yes') { echo " via Telegram";} echo"
"; + } + else { + echo "sent "; echo timeago($chat_tstamp); echo " ago"; if($sent_telegram == 'yes') { echo " via Telegram";} echo""; + } + } + else { + if($displayname == 'no') { + $chat_username = ""; + $csplit1_name = ""; + $csplit2_name = ""; + $csplit3_name = ""; + $verif_check = ""; + } + echo "
"; + if($chat_csplit == 'on') { + if($chat_sticker != '' && $displayname != 'no') { + echo "\"\" "; + } + echo "$csplit1_name$csplit2_name$csplit3_name"; + } + else { + if($chat_sticker != '' && $displayname != 'no') { + echo "\"\" "; + } + echo $chat_username; + } + echo " " . $verif_check; + echo "
"; + // if message is an image + if($mtype == 'img') { + // + // Data Saver + if($u_datasaver == 'on') { + echo "
[view image]
"; + } + else { + echo "
\"\"
"; + } + // Data Saver + // + } + // if message is normal + else { + echo "
" . $string . "
"; + } + echo ""; + if($mtype == 'img') { + echo "
view image
"; + echo "sent "; echo timeago($chat_tstamp); echo " ago"; if($sent_telegram == 'yes') { echo " via Telegram";} echo"
"; + } + else { + echo "sent "; echo timeago($chat_tstamp); echo " ago"; if($sent_telegram == 'yes') { echo " via Telegram";} echo""; + } + } + } +/* ^^^ IF THE CHAT MESSAGE TYPE IS NORMAL ^^^ */ +} +} +?> + diff --git a/chat/online-dark.php b/chat/online-dark.php new file mode 100644 index 0000000..77db398 --- /dev/null +++ b/chat/online-dark.php @@ -0,0 +1,165 @@ + 0) { + if($weeks == 1) { echo "1$w_ago"; } + else { echo "$weeks$w_ago"; } + } +} +$new = $tstamp - 60; +// if active, display them +$sc_onl = mysqli_query($conx, "SELECT username FROM accounts WHERE chat_time >= $new && lurker_mode='no' ORDER BY username"); +$l_cnt = mysqli_num_rows($sc_onl); +$onlci = mysqli_query($conx, "SELECT tstamp FROM chat ORDER BY id DESC LIMIT 1"); +$cironl = mysqli_fetch_assoc($onlci); +$chatac = $cironl['tstamp']; + +$HUAHHH = time() - $chatac; +$mens = round($HUAHHH / 60); +if($mens <= 1) { +echo " $l_cnt online."; +} +elseif($mens <= 2) { + echo " $l_cnt online."; +} +elseif($mens < 5) { + echo " $l_cnt online."; +} +else { + echo " $l_cnt online."; +} +echo "
"; +?> + + $online_username"; + if (!$separator) $separator = ', '; + }*/ + + if ($mins <= 1) { + if($on_chat_attack_hp <= 0) { + $on_chat_attack_hp = "0"; + } + if($on_chat_attack_hp == 0) { + $is_dead = "; rip"; + } + else { + $is_dead = ""; + } + if($on_chat_shield_tstamp > $tstamp) { + $is_shield = "| "; + } + else { + $is_shield = ""; + } + + if($on_chat_attack_hp >= 75) { + $hp_color = "#333333"; + } + elseif($on_chat_attack_hp >= 26) { + $hp_color = "#333333"; + } + else { + $hp_color = "#333333"; + } + if($online_verf == 'yes') { + echo " "; + } + echo "$online_username; $on_chat_attack_hp HP$is_dead $is_shield"; if($on_chat_shield_tstamp > $tstamp) { echo shieldtime($on_chat_shield_tstamp); echo " left"; if($online_username != $u_username) { echo " [X]"; }} echo ""; + if($online_username != $u_username) { + echo "   "; + echo "\"\"   "; + echo "\"\"   "; + echo "\"\"   "; + echo "\"\""; + } + if($online_username == $u_username) { + echo " [   ||  +  ||  ++ ]"; + } + echo "
"; + echo "
"; + echo "
+
 
+
"; + echo "
"; + } +} +/* +echo "
"; +echo "
+Chat Games
+Chat Attack is currently underway.
+If your HP drops below 0- you will be jailed for 2min.
+Use the commands below to attack other users or to save yourself.
+Each chat message restores 2 HP- don't spam.
+If the Chat stops working, you are probably dead. Refresh the page.
+This game is meant to be fun- enjoy!

+ +Punch
+/p USER [-1 HP; COST: -15 MDF]
+Stab
+/st USER [-5 HP; COST: -30 MDF]
+Shoot
+/s USER [-10 HP; COST: -50 MDF]
+Nuke
+/nuke USER [-100 HP; COST: -10,000 MDF]
+Break Shield
+/bs USER [COST: -1,000 MDF]

+Use Shield
+/shd [DURATION: 60s; COST: -300 MDF]
+Use Shield+
+/shp [DURATION: 2min; COST: -700 MDF]
+Use Shield++
+/shpp [DURATION: 5min; COST: -1,200 MDF]
+
"; */ +?> diff --git a/chat/online.php b/chat/online.php new file mode 100644 index 0000000..bf51891 --- /dev/null +++ b/chat/online.php @@ -0,0 +1,165 @@ + 0) { + if($weeks == 1) { echo "1$w_ago"; } + else { echo "$weeks$w_ago"; } + } +} +$new = $tstamp - 60; +// if active, display them +$sc_onl = mysqli_query($conx, "SELECT username FROM accounts WHERE chat_time >= $new && lurker_mode='no' ORDER BY username"); +$l_cnt = mysqli_num_rows($sc_onl); +$onlci = mysqli_query($conx, "SELECT tstamp FROM chat ORDER BY id DESC LIMIT 1"); +$cironl = mysqli_fetch_assoc($onlci); +$chatac = $cironl['tstamp']; + +$HUAHHH = time() - $chatac; +$mens = round($HUAHHH / 60); +if($mens <= 1) { +echo " $l_cnt online."; +} +elseif($mens <= 2) { + echo " $l_cnt online."; +} +elseif($mens < 5) { + echo " $l_cnt online."; +} +else { + echo " $l_cnt online."; +} +echo "
"; +?> + + $online_username"; + if (!$separator) $separator = ', '; + }*/ + + if ($mins <= 1) { + if($on_chat_attack_hp <= 0) { + $on_chat_attack_hp = "0"; + } + if($on_chat_attack_hp == 0) { + $is_dead = "; rip"; + } + else { + $is_dead = ""; + } + if($on_chat_shield_tstamp > $tstamp) { + $is_shield = "| "; + } + else { + $is_shield = ""; + } + + if($on_chat_attack_hp >= 75) { + $hp_color = "#4CDC4C"; + } + elseif($on_chat_attack_hp >= 26) { + $hp_color = "#FFB732"; + } + else { + $hp_color = "#ff4c4c"; + } + if($online_verf == 'yes') { + echo " "; + } + echo "$online_username; $on_chat_attack_hp HP$is_dead $is_shield"; if($on_chat_shield_tstamp > $tstamp) { echo shieldtime($on_chat_shield_tstamp); echo " left"; if($online_username != $u_username) { echo " [X]"; }} echo ""; + if($online_username != $u_username) { + echo "   "; + echo "\"\"   "; + echo "\"\"   "; + echo "\"\"   "; + echo "\"\""; + } + if($online_username == $u_username) { + echo " [   ||  +  ||  ++ ]"; + } + echo "
"; + echo "
"; + echo "
+
 
+
"; + echo "
"; + } +} +/* +echo "
"; +echo "
+Chat Games
+Chat Attack is currently underway.
+If your HP drops below 0- you will be jailed for 2min.
+Use the commands below to attack other users or to save yourself.
+Each chat message restores 2 HP- don't spam.
+If the Chat stops working, you are probably dead. Refresh the page.
+This game is meant to be fun- enjoy!

+ +Punch
+/p USER [-1 HP; COST: -15 MDF]
+Stab
+/st USER [-5 HP; COST: -30 MDF]
+Shoot
+/s USER [-10 HP; COST: -50 MDF]
+Nuke
+/nuke USER [-100 HP; COST: -10,000 MDF]
+Break Shield
+/bs USER [COST: -1,000 MDF]

+Use Shield
+/shd [DURATION: 60s; COST: -300 MDF]
+Use Shield+
+/shp [DURATION: 2min; COST: -700 MDF]
+Use Shield++
+/shpp [DURATION: 5min; COST: -1,200 MDF]
+
"; */ +?> diff --git a/chat/online_upd.php b/chat/online_upd.php new file mode 100644 index 0000000..41ad0b9 --- /dev/null +++ b/chat/online_upd.php @@ -0,0 +1,9 @@ + diff --git a/chat/pm_send.php b/chat/pm_send.php new file mode 100644 index 0000000..aaeae66 --- /dev/null +++ b/chat/pm_send.php @@ -0,0 +1,30 @@ + diff --git a/chat/save.php b/chat/save.php new file mode 100644 index 0000000..1ba19a7 --- /dev/null +++ b/chat/save.php @@ -0,0 +1,27 @@ + diff --git a/chat/send.php b/chat/send.php new file mode 100644 index 0000000..499efd9 --- /dev/null +++ b/chat/send.php @@ -0,0 +1,616 @@ + diff --git a/chat/send_sticky.php b/chat/send_sticky.php new file mode 100644 index 0000000..eae049c --- /dev/null +++ b/chat/send_sticky.php @@ -0,0 +1,116 @@ + diff --git a/chat/telegram-send.php b/chat/telegram-send.php new file mode 100644 index 0000000..29d220c --- /dev/null +++ b/chat/telegram-send.php @@ -0,0 +1,53 @@ + diff --git a/chat/telegram.php b/chat/telegram.php new file mode 100644 index 0000000..eb175d1 --- /dev/null +++ b/chat/telegram.php @@ -0,0 +1,572 @@ + + + + + Chat+ | Misdew.com + + + + + + + "; + } + if($css_type == "raw") { + echo ""; + } + ?> + + + + + + +
+ +
"; + if($u_csplown == 'yes' && $u_csplit == 'on') { + echo "
+ no changes detected +
+ + + + + + + + + + + + + +
+ cSplit Configuration +
+ The splitting of your username must be exactly the same as your username. It is case sensitive. +
+ $u_cspname1$u_cspname2$u_cspname3 + to + $u_cspname1$u_cspname2$u_cspname3 +
+ Username Coloration +
+
+
+ Username Splitting +
+
+
+
+ + + + + +
+
Update
+
+
Disable
+

"; + } + elseif($u_csplown == 'yes' && $u_csplit == 'off') { + echo " + + + + + +
+ cSplit +
+ You own cSplit, but it is currently disabled for your account. You can enable it below. +
+ + + + +
+
Enable
+

"; + } + elseif($u_csplown == 'no') { + $u_totalc = number_format($u_cmsgs); + echo " + + + + + +
+ cSplit +
+ This feature is available only to users who have sent a total of 1,000 chat messages. So far, you have sent $u_totalc. Once you have reached that limit, you will be able to purchase cSplit for $5.00 using the command below. Remember, spamming or flooding to meet this limit is against the rules. +
+ + + + +
+
/cspl buy $u_username
+

"; + } + echo "
"; + ?> +
+
+ + + + +
+
+ + +
+   +
+ + + +
+ +
+ + + +
+ "; + echo "Chat is not private or secure. Your messages and PMs can/may be read at any time.
They are stored in plaintext on our server.
"; + require_once("../inc/footer.php"); + ?> +
+ + diff --git a/chat/toggle_cspl.php b/chat/toggle_cspl.php new file mode 100644 index 0000000..2040ad8 --- /dev/null +++ b/chat/toggle_cspl.php @@ -0,0 +1,12 @@ + diff --git a/chat/typing.php b/chat/typing.php new file mode 100644 index 0000000..f132dc9 --- /dev/null +++ b/chat/typing.php @@ -0,0 +1,13 @@ + diff --git a/chat/typing_stop.php b/chat/typing_stop.php new file mode 100644 index 0000000..1456df2 --- /dev/null +++ b/chat/typing_stop.php @@ -0,0 +1,6 @@ + diff --git a/chat/vid_upload.php b/chat/vid_upload.php new file mode 100644 index 0000000..53cc09f --- /dev/null +++ b/chat/vid_upload.php @@ -0,0 +1,63 @@ + base64_encode($data), + 'key' => urlencode($required_key), + 'user' => urlencode($u_uid), + 'imagetype' => urlencode($u_uid), + 'imaeg' => urlencode($u_cloudterms), + 'fieltyp' => urlencode($u_cloudterms), + 'usernaem' => urlencode($u_username), + 'filextension' => urlencode($u_username), + 'uvia' => urlencode($uploc) + ); + $curl = curl_init(); + curl_setopt($curl, CURLOPT_URL, 'https://upl.justa.us/video.php'); # yeah change this URL to ur own site or page thx + curl_setopt($curl, CURLOPT_TIMEOUT, 30); + curl_setopt($curl, CURLOPT_POST, 1); + curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($curl, CURLOPT_POSTFIELDS, $POST_DATA); + $url = curl_exec($curl); + if($url!=""){ + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $dis_pmuid = $disr['pmuid']; + $msgtype = $disr['msgtype']; + if($dis_uid == $u_uid) { + if($msgtype != 'pm') { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + } + $url_link = "view file"; + $disq = mysqli_query($conx, "SELECT id,uid,pmuid,msgtype FROM chat ORDER BY id DESC LIMIT 1"); + $disr = mysqli_fetch_assoc($disq); + $dis_id = $disr['id']; + $dis_uid = $disr['uid']; + $jb_uid = "6"; + if($dis_uid == $jb_uid) { + mysqli_query($conx, "UPDATE chat SET display_name='no' WHERE id='$dis_id'"); + } + mysqli_query($conx, "INSERT INTO chat (uid, message, tstamp) VALUES ('6', '@$u_username uploaded a video: $url_link', '$tstamp')"); + echo $url; + } + else { + // there was an error uploading the image + } + curl_close ($curl); +} + + + +?> diff --git a/chat/wide.php b/chat/wide.php new file mode 100644 index 0000000..459306f --- /dev/null +++ b/chat/wide.php @@ -0,0 +1,402 @@ + + + + + Chat - Misdew + + + + + + + "; + } + if($css_type == "raw") { + echo ""; + } + ?> + + + + + + +
+ +
"; + if($u_csplown == 'yes' && $u_csplit == 'on') { + echo "
+ no changes detected +
+ + + + + + + + + + + + + +
+ cSplit Configuration +
+ The splitting of your username must be exactly the same as your username. It is case sensitive. +
+ $u_cspname1$u_cspname2$u_cspname3 + to + $u_cspname1$u_cspname2$u_cspname3 +
+ Username Coloration +
+
+
+ Username Splitting +
+
+
+
+ + + + + +
+
Update
+
+
Disable
+

"; + } + elseif($u_csplown == 'yes' && $u_csplit == 'off') { + echo " + + + + + +
+ cSplit +
+ You own cSplit, but it is currently disabled for your account. You can enable it below. +
+ + + + +
+
Enable
+

"; + } + elseif($u_csplown == 'no') { + $u_totalc = number_format($u_cmsgs); + echo " + + + + + +
+ cSplit +
+ This feature is available only to users who have sent a total of 1,000 chat messages. So far, you have sent $u_totalc. Once you have reached that limit, you will be able to purchase cSplit for $5.00 using the command below. Remember, spamming or flooding to meet this limit is against the rules. +
+ + + + +
+
/cspl buy $u_username
+

"; + } + echo "
"; + ?> +
+
+ + +   + + +
+
+ +
+   +
+
+ +
+ + +
+ "; + echo "Chat is not private or secure. Your messages and PMs can/may be read at any time.
They are stored in plaintext on our server.
"; + require_once("../inc/footer.php"); + ?> +
+ +