Add files via upload
This commit is contained in:
parent
aaaad6ddd1
commit
fa36df8a0e
18 changed files with 1737 additions and 1 deletions
13
inc/alertbell-dark.php
Normal file
13
inc/alertbell-dark.php
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
require_once("../inc/conx.php");
|
||||
|
||||
$extra = mysqli_query($conx, "SELECT uid FROM notifs WHERE uid='$u_uid' && viewed='no' ORDER BY id");
|
||||
$ncount = mysqli_num_rows($extra);
|
||||
if($ncount > 0) {
|
||||
$alert_bell_color = "#939393";
|
||||
}
|
||||
if($ncount <= 0) {
|
||||
$ncount = "";
|
||||
}
|
||||
echo "<i id=\"header_tds\" style=\"color: $alert_bell_color !important;\" class=\"fa fa-bell\" aria-hidden=\"true\"></i>";
|
||||
?>
|
||||
13
inc/alertbell.php
Normal file
13
inc/alertbell.php
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
require_once("../inc/conx.php");
|
||||
|
||||
$extra = mysqli_query($conx, "SELECT uid FROM notifs WHERE uid='$u_uid' && viewed='no' ORDER BY id");
|
||||
$ncount = mysqli_num_rows($extra);
|
||||
if($ncount > 0) {
|
||||
$alert_bell_color = "#ffff99";
|
||||
}
|
||||
if($ncount <= 0) {
|
||||
$ncount = "";
|
||||
}
|
||||
echo "<i id=\"header_tds\" style=\"color: $alert_bell_color !important;\" class=\"fa fa-bell\" aria-hidden=\"true\"></i>";
|
||||
?>
|
||||
105
inc/alerts.php
Normal file
105
inc/alerts.php
Normal file
|
|
@ -0,0 +1,105 @@
|
|||
<?php
|
||||
require_once("../inc/conx.php");
|
||||
if($logged_in == false) {
|
||||
header("location: /");
|
||||
exit();
|
||||
}
|
||||
// notification tray
|
||||
$nquery = mysqli_query($conx, "SELECT id,app_uqid,message,view_link,tstamp,rstring,snoozeable FROM notifs WHERE uid='$u_uid' && viewed='no' ORDER BY id DESC LIMIT 3");
|
||||
while ($nrow = mysqli_fetch_assoc($nquery)) {
|
||||
$notifid = $nrow['id'];
|
||||
$app_uqid = $nrow['app_uqid'];
|
||||
$app_msg = $nrow['message'];
|
||||
$app_link = $nrow['view_link'];
|
||||
$app_tst = $nrow['tstamp'];
|
||||
$nrstr = $nrow['rstring'];
|
||||
$nsnoozb = $nrow['snoozeable'];
|
||||
$apdq = mysqli_query($conx, "SELECT uqid,title,app_color,link FROM apps WHERE uqid='$app_uqid'");
|
||||
while($ap = mysqli_fetch_assoc($apdq)) {
|
||||
$app_color = $ap['app_color'];
|
||||
$app_name = $ap['title'];
|
||||
}
|
||||
$asno = mysqli_query($conx, "SELECT snooze FROM user_apps WHERE app_uqid='$app_uqid' && uid='$u_uid'");
|
||||
while($nz = mysqli_fetch_assoc($asno)) {
|
||||
$app_snooze = $nz['snooze'];
|
||||
}
|
||||
echo "<div onclick=\"expand('$nrstr');\" class=\"notif\">
|
||||
<span class=\"nname\" style=\"font-family: 'Dosis', sans-serif; color: $app_color; font-weight: bold;\" id=\"appname_$app_uqid\">$app_name</span> <span class=\"tago\">• ";
|
||||
echo timeago($app_tst);
|
||||
echo "</span> <br>
|
||||
$app_msg
|
||||
</div>
|
||||
<div class=\"notif\" style=\"display: none; border-top: 1px solid #ccc; font-size: 15px; color: $app_color; font-family: 'Dosis', sans-serif;\" id=\"$nrstr\">";
|
||||
//only echo a view link if one is there
|
||||
if($app_link) {
|
||||
echo "<a class=\"nview\" href=\"/inc/view.php?i=$notifid&&t=$u_token\" style=\"color: $app_color; text-decoration: none;\" id=\"view_$app_uqid\">view</a> ";
|
||||
}
|
||||
// snooze
|
||||
if($nsnoozb == 'yes') {
|
||||
if($app_snooze == 'yes') {
|
||||
echo "<a id=\"tid_$notifid\" class=\"nsnooze\" href=\"wake.php?i=$notifid&&t=$u_token\" style=\"color: $app_color; text-decoration: none;\" id=\"snooze_$app_uqid\">wake</a> ";
|
||||
}
|
||||
else {
|
||||
echo "<a id=\"tid_$notifid\" class=\"nsnooze\" style=\"color: $app_color; text-decoration: none;\" id=\"snooze_$app_uqid\">snooze</a> ";
|
||||
}
|
||||
}
|
||||
echo "<a id=\"did_$notifid\" class=\"ndismiss\" style=\"color: $app_color; text-decoration: none;\" id=\"snooze_$app_uqid\">dismiss</a>
|
||||
</div>";
|
||||
}
|
||||
// get extra count at bottom of notifs
|
||||
$extra = mysqli_query($conx, "SELECT uid FROM notifs WHERE uid='$u_uid' && viewed='no' ORDER BY id");
|
||||
$ncount = mysqli_num_rows($extra);
|
||||
if($ncount > 3) {
|
||||
$how_many = $ncount - 3;
|
||||
echo "<div class=\"notif\" style=\"font-size: 13px\" onclick=\"window.location='/alerts';\">+$how_many more</div> <br>";
|
||||
}
|
||||
elseif($ncount >= 1) {
|
||||
echo "<br>";
|
||||
}
|
||||
?>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
|
||||
<script>
|
||||
function upAlerts() {
|
||||
$.get("/inc/alerts.php", function(d) {
|
||||
$("#ld_alerts").html(d);
|
||||
});
|
||||
}
|
||||
var Alerts = document.querySelectorAll("a[id^=tid_]");
|
||||
[].forEach.call(Alerts, function(notif){
|
||||
notif.onclick = function(e){
|
||||
var notifo = new XMLHttpRequest();
|
||||
notifo.open("GET", "/inc/toggle.php?t=<?php echo $u_token; ?>&&i=" + notif.id.match(/([0-9]*)$/)[0], true);
|
||||
notifo.onreadystatechange = function(){
|
||||
if (notifo.readyState == 4)
|
||||
if(notifo.status == 200) {
|
||||
upAlerts();
|
||||
}
|
||||
else {
|
||||
alert("error");
|
||||
}
|
||||
};
|
||||
notif.innerHTML = "...";
|
||||
notifo.send();
|
||||
return false;
|
||||
};
|
||||
});
|
||||
var Alerts = document.querySelectorAll("a[id^=did_]");
|
||||
[].forEach.call(Alerts, function(notif){
|
||||
notif.onclick = function(e){
|
||||
var notifo = new XMLHttpRequest();
|
||||
notifo.open("GET", "/inc/dismiss.php?t=<?php echo $u_token; ?>&&i=" + notif.id.match(/([0-9]*)$/)[0], true);
|
||||
notifo.onreadystatechange = function(){
|
||||
if (notifo.readyState == 4)
|
||||
if(notifo.status == 200) {
|
||||
upAlerts();
|
||||
}
|
||||
else {
|
||||
alert("error");
|
||||
}
|
||||
};
|
||||
notif.innerHTML = "...";
|
||||
notifo.send();
|
||||
return false;
|
||||
};
|
||||
});
|
||||
</script>
|
||||
356
inc/check-conx.php
Normal file
356
inc/check-conx.php
Normal file
|
|
@ -0,0 +1,356 @@
|
|||
<?php
|
||||
# CONNECT TO THE DATABASE
|
||||
$conx = mysqli_connect("127.0.0.1","mdv5","ur own password here but i dont think this file is even used only the conx.php one","mdv5");
|
||||
if (mysqli_connect_errno($conx)) {
|
||||
echo mysqli_connect_error();
|
||||
}
|
||||
# DEFINE BASIC INFO
|
||||
$ipaddr = $_SERVER['REMOTE_ADDR'];
|
||||
$uagent = $_SERVER['HTTP_USER_AGENT'];
|
||||
$tstamp = time();
|
||||
# CHECK TO SEE IF THE USER IS LOGGED IN
|
||||
if (isset($_COOKIE['akgnxoPwqlIs']) && isset($_COOKIE['LoILilzcnmwe']) && isset($_COOKIE['puTtxXvbEkOo'])) {
|
||||
$rstra = $_COOKIE['akgnxoPwqlIs'];
|
||||
$rstrb = $_COOKIE['LoILilzcnmwe'];
|
||||
$rstrc = $_COOKIE['puTtxXvbEkOo'];
|
||||
$cks = mysqli_query($conx, "SELECT rstringa,rstringb,rstringc FROM accounts WHERE rstringa='$rstra' && rstringb='$rstrb' && rstringc='$rstrc'");
|
||||
$ckcn = mysqli_num_rows($cks);
|
||||
if($ckcn > 0) {
|
||||
$logged_in = true;
|
||||
}
|
||||
else {
|
||||
$logged_in = false;
|
||||
}
|
||||
# STUFF FOR BEING LOGGED IN
|
||||
if($logged_in == true) {
|
||||
$x = mysqli_query($conx, "SELECT * FROM accounts WHERE rstringa='$rstra' && rstringb='$rstrb' && rstringc='$rstrc'");
|
||||
$y = mysqli_fetch_assoc($x);
|
||||
$u_uid = $y['uid'];
|
||||
$u_verified = $y['verified'];
|
||||
if($u_verified != 'yes') {
|
||||
$kill = '';
|
||||
$msg = 'nvdjrj6jfnxalpowqnzaiywliz';
|
||||
setcookie("akgnxoPwqlIs", $kill, time()+3600*24*30, '/', '.misdew.com');
|
||||
setcookie("LoILilzcnmwe", $kill, time()+3600*24*30, '/', '.misdew.com');
|
||||
setcookie("puTtxXvbEkOo", $kill, time()+3600*24*30, '/', '.misdew.com');
|
||||
setcookie("hwsmnzeiopqm", $msg, time()+3600*24*30, '/', '.misdew.com');
|
||||
header("location: /");
|
||||
exit();
|
||||
}
|
||||
$u_username = $y['username'];
|
||||
$u_cloudterms = $y['cloudterms'];
|
||||
$email_secure = $y['email_secure'];
|
||||
if($email_secure != '') {
|
||||
header("location: /");
|
||||
exit();
|
||||
}
|
||||
$u_token = $y['token'];
|
||||
$u_theme = $y['theme'];
|
||||
$u_rank = $y['rank'];
|
||||
$u_currip = $y['current_ip'];
|
||||
$u_joinstamp = $y['joinstamp'];
|
||||
$u_emoji_type = $y['emoji_type'];
|
||||
$u_can_mail = $y['who_can_mail'];
|
||||
$u_mail_rand = $y['mail_random_gen'];
|
||||
$u_siteloc = $y['site_locurl'];
|
||||
$u_bot = $y['bot'];
|
||||
$u_comm_mang = $y['comm_mang'];
|
||||
$u_cont_mang = $y['cont_mang'];
|
||||
$u_design_pol = $y['design_police'];
|
||||
$u_peacekpr = $y['peacekeeper'];
|
||||
$u_css = $y['css'];
|
||||
$u_funds = $y['funds'];
|
||||
$u_jailed = $y['jailed'];
|
||||
$u_uagent = $y['uagent'];
|
||||
$u_ads = $y['ads'];
|
||||
$u_datasaver = $y['data_saver'];
|
||||
$u_notifc = $y['notif_clear'];
|
||||
$u_sticker = $y['sticker'];
|
||||
$u_cmsgs = $y['total_cmsgs'];
|
||||
$u_csplit = $y['csplit'];
|
||||
$u_csplown = $y['csplit_own'];
|
||||
$u_hubmain = $y['hubmain'];
|
||||
$u_chatgames = $y['chat_games'];
|
||||
if($u_jailed == 'yes') {
|
||||
header("location: /jail");
|
||||
exit();
|
||||
}
|
||||
// update online record
|
||||
$rq = mysqli_query($conx, "SELECT category FROM apps WHERE id='13'");
|
||||
$da = mysqli_fetch_array($rq);
|
||||
$r_cnt = $da['category'];
|
||||
$new = $tstamp - 120;
|
||||
$sc_onl = mysqli_query($conx, "SELECT uid FROM accounts WHERE online_time >= $new ORDER BY username");
|
||||
$l_cnt = mysqli_num_rows($sc_onl);
|
||||
if ($l_cnt > $r_cnt) {
|
||||
mysqli_query($conx, "UPDATE apps SET category='$l_cnt' WHERE id='13'");
|
||||
}
|
||||
// update online record
|
||||
# UPDATE ONLINE TIME
|
||||
//mysqli_query($conx, "UPDATE accounts SET online_time='$tstamp' WHERE uid='$u_uid'");
|
||||
# STUFF FOR FIGURES
|
||||
$e = mysqli_query($conx, "SELECT activeness FROM account_figures WHERE uid='$u_uid'");
|
||||
$d = mysqli_fetch_assoc($e);
|
||||
$f_activeness = $d['activeness'];
|
||||
# UPDATE CURRENT IP IF IT DOES NOT MATCH IP FROM SERVER
|
||||
if($ipaddr != $u_currip) {
|
||||
mysqli_query($conx, "UPDATE accounts SET current_ip='$ipaddr' WHERE uid='$u_uid'");
|
||||
}
|
||||
# GET THE THEME
|
||||
$kds = mysqli_query($conx, "SELECT id,raw_css,href_stylesheet,main_metacolor,main_tdcolor FROM themes WHERE id='$u_theme'");
|
||||
$gds = mysqli_fetch_assoc($kds);
|
||||
$g_themeid = $gds['id'];
|
||||
$g_raw = $gds['raw_css'];
|
||||
$g_sheet = $gds['href_stylesheet'];
|
||||
$g_mainmeta = $gds['main_metacolor'];
|
||||
$g_maintd = $gds['main_tdcolor'];
|
||||
# IS THE THEME FROM RAW CSS OR A STYLESHEET
|
||||
if($g_sheet) {
|
||||
$css_type = "sheet";
|
||||
}
|
||||
else {
|
||||
$css_type = "raw";
|
||||
}
|
||||
# DEFAULT APPS THEME INFO
|
||||
|
||||
//$this_page = '';
|
||||
if($this_page) {
|
||||
$thm = mysqli_query($conx, "SELECT * FROM themes WHERE id='$u_theme'");
|
||||
$tms = mysqli_fetch_assoc($thm);
|
||||
$ccanvas = $tms['canvas'];
|
||||
$ccanvas_acc = $tms['canvas_acc'];
|
||||
$cfeed = $tms['feed'];
|
||||
$cfeed_acc = $tms['feed_acc'];
|
||||
$cchat = $tms['chat'];
|
||||
$cchat_acc = $tms['chat_acc'];
|
||||
$cmail = $tms['mail'];
|
||||
$cmail_acc = $tms['mail_acc'];
|
||||
$cthemes = $tms['themes'];
|
||||
$cthemes_acc = $tms['themes_acc'];
|
||||
$cblogs = $tms['blogs'];
|
||||
$cblogs_acc = $tms['blogs_acc'];
|
||||
$cforums = $tms['forums'];
|
||||
$cforums_acc = $tms['forums_acc'];
|
||||
$czones = $tms['zones'];
|
||||
$czones_acc = $tms['zones_acc'];
|
||||
$cdraw = $tms['draw'];
|
||||
$cdraw_acc = $tms['draw_acc'];
|
||||
$cmarket = $tms['market'];
|
||||
$cmarket_acc = $tms['market_acc'];
|
||||
$calerts = $tms['alerts'];
|
||||
$calerts_acc = $tms['alerts_acc'];
|
||||
$csettings = $tms['settings'];
|
||||
$csettings_acc = $tms['settings_acc'];
|
||||
$same_meta = $tms['same_meta'];
|
||||
if($this_page == "canvas") {
|
||||
// make sure meta theme color is filled
|
||||
if($ccanvas) {
|
||||
$meta_theme_color = $ccanvas;
|
||||
$tdcolor = $ccanvas_acc;
|
||||
}
|
||||
else {
|
||||
$meta_theme_color = $g_mainmeta;
|
||||
$tdcolor = $g_maintd;
|
||||
}
|
||||
$bgcolor = $meta_theme_color;
|
||||
}
|
||||
if($this_page == "feed") {
|
||||
// make sure meta theme color is filled
|
||||
if($cfeed) {
|
||||
$meta_theme_color = $cfeed;
|
||||
$tdcolor = $cfeed_acc;
|
||||
}
|
||||
else {
|
||||
$meta_theme_color = $g_mainmeta;
|
||||
$tdcolor = $g_maintd;
|
||||
}
|
||||
$bgcolor = $meta_theme_color;
|
||||
}
|
||||
if($this_page == "chat") {
|
||||
// make sure meta theme color is filled
|
||||
if($cchat) {
|
||||
$meta_theme_color = $cchat;
|
||||
$tdcolor = $cchat_acc;
|
||||
}
|
||||
else {
|
||||
$meta_theme_color = $g_mainmeta;
|
||||
$tdcolor = $g_maintd;
|
||||
}
|
||||
$bgcolor = $meta_theme_color;
|
||||
}
|
||||
if($this_page == "mail") {
|
||||
// make sure meta theme color is filled
|
||||
if($cmail) {
|
||||
$meta_theme_color = $cmail;
|
||||
$tdcolor = $cmail_acc;
|
||||
}
|
||||
else {
|
||||
$meta_theme_color = $g_mainmeta;
|
||||
$tdcolor = $g_maintd;
|
||||
}
|
||||
$bgcolor = $meta_theme_color;
|
||||
}
|
||||
if($this_page == "themes") {
|
||||
// make sure meta theme color is filled
|
||||
if($cthemes) {
|
||||
$meta_theme_color = $cthemes;
|
||||
$tdcolor = $cthemes_acc;
|
||||
}
|
||||
else {
|
||||
$meta_theme_color = $g_mainmeta;
|
||||
$tdcolor = $g_maintd;
|
||||
}
|
||||
$bgcolor = $meta_theme_color;
|
||||
}
|
||||
if($this_page == "blogs") {
|
||||
// make sure meta theme color is filled
|
||||
if($cblogs) {
|
||||
$meta_theme_color = $cblogs;
|
||||
$tdcolor = $cblogs_acc;
|
||||
}
|
||||
else {
|
||||
$meta_theme_color = $g_mainmeta;
|
||||
$tdcolor = $g_maintd;
|
||||
}
|
||||
$bgcolor = $meta_theme_color;
|
||||
}
|
||||
if($this_page == "forums") {
|
||||
// make sure meta theme color is filled
|
||||
if($cforums) {
|
||||
$meta_theme_color = $cforums;
|
||||
$tdcolor = $cforums_acc;
|
||||
}
|
||||
else {
|
||||
$meta_theme_color = $g_mainmeta;
|
||||
$tdcolor = $g_maintd;
|
||||
}
|
||||
$bgcolor = $meta_theme_color;
|
||||
}
|
||||
if($this_page == "zones") {
|
||||
// make sure meta theme color is filled
|
||||
if($czones) {
|
||||
$meta_theme_color = $czones;
|
||||
$tdcolor = $czones_acc;
|
||||
}
|
||||
else {
|
||||
$meta_theme_color = $g_mainmeta;
|
||||
$tdcolor = $g_maintd;
|
||||
}
|
||||
$bgcolor = $meta_theme_color;
|
||||
}
|
||||
if($this_page == "draw") {
|
||||
// make sure meta theme color is filled
|
||||
if($cdraw) {
|
||||
$meta_theme_color = $cdraw;
|
||||
$tdcolor = $cdraw_acc;
|
||||
}
|
||||
else {
|
||||
$meta_theme_color = $g_mainmeta;
|
||||
$tdcolor = $g_maintd;
|
||||
}
|
||||
$bgcolor = $meta_theme_color;
|
||||
}
|
||||
if($this_page == "market") {
|
||||
// make sure meta theme color is filled
|
||||
if($cmarket) {
|
||||
$meta_theme_color = $cmarket;
|
||||
$tdcolor = $cmarket_acc;
|
||||
}
|
||||
else {
|
||||
$meta_theme_color = $g_mainmeta;
|
||||
$tdcolor = $g_maintd;
|
||||
}
|
||||
$bgcolor = $meta_theme_color;
|
||||
}
|
||||
if($this_page == "alerts") {
|
||||
// make sure meta theme color is filled
|
||||
if($calerts) {
|
||||
$meta_theme_color = $calerts;
|
||||
$tdcolor = $calerts_acc;
|
||||
}
|
||||
else {
|
||||
$meta_theme_color = $g_mainmeta;
|
||||
$tdcolor = $g_maintd;
|
||||
}
|
||||
$bgcolor = $meta_theme_color;
|
||||
}
|
||||
if($this_page == "settings") {
|
||||
// make sure meta theme color is filled
|
||||
if($csettings) {
|
||||
$meta_theme_color = $csettings;
|
||||
$tdcolor = $csettings_acc;
|
||||
}
|
||||
else {
|
||||
$meta_theme_color = $g_mainmeta;
|
||||
$tdcolor = $g_maintd;
|
||||
}
|
||||
$bgcolor = $meta_theme_color;
|
||||
}
|
||||
if($same_meta) {
|
||||
$meta_theme_color = $same_meta;
|
||||
}
|
||||
}
|
||||
else {
|
||||
$meta_theme_color = $g_mainmeta;
|
||||
}
|
||||
# GET THE USER'S THEME COLORS FOR THEIR USERNAME AND TEXT COLOR
|
||||
$usri_q = mysqli_query($conx, "SELECT username_color,text_color,csplit1_color,csplit2_color,csplit3_color,csplit1_name,csplit2_name,csplit3_name FROM user_theme_colors WHERE uid='$u_uid' && theme_id='$g_themeid'");
|
||||
while($usri_r = mysqli_fetch_assoc($usri_q)) {
|
||||
$u_ucolor = $usri_r['username_color'];
|
||||
$u_tcolor = $usri_r['text_color'];
|
||||
$u_cspcolor1 = $usri_r['csplit1_color'];
|
||||
$u_cspcolor2 = $usri_r['csplit2_color'];
|
||||
$u_cspcolor3 = $usri_r['csplit3_color'];
|
||||
$u_cspname1 = $usri_r['csplit1_name'];
|
||||
$u_cspname2 = $usri_r['csplit2_name'];
|
||||
$u_cspname3 = $usri_r['csplit3_name'];
|
||||
}
|
||||
//
|
||||
function timeago($session_time) {
|
||||
$time_difference = time() - $session_time;
|
||||
$seconds = $time_difference;
|
||||
$minutes = round($time_difference/60);
|
||||
$hours = round($time_difference/3600);
|
||||
$days = round($time_difference/86400);
|
||||
$weeks = round($time_difference/604800);
|
||||
$months = round($time_difference/2419200);
|
||||
$years = round($time_difference/29030400);
|
||||
$s_ago = "s"; $mo_ago = "mo"; $y_ago = "yrs"; $m_ago = "m"; $h_ago = "h"; $w_ago = "w"; $d_ago = "d";
|
||||
if($seconds <= 59) { echo "$seconds$s_ago"; }
|
||||
else if($minutes <= 59) {
|
||||
if($minutes == 1) { echo "1$m_ago"; }
|
||||
else { echo "$minutes$m_ago"; }
|
||||
}
|
||||
else if($hours <= 23) {
|
||||
if($hours == 1) { echo "1$h_ago"; }
|
||||
else { echo "$hours$h_ago"; }
|
||||
}
|
||||
else if($days <= 6) {
|
||||
if($days == 1) { echo "1$d_ago"; }
|
||||
else { echo "$days$d_ago"; }
|
||||
}
|
||||
else if($weeks <= 4) {
|
||||
if($weeks == 1) { echo "1$w_ago"; }
|
||||
else { echo "$weeks$w_ago"; }
|
||||
}
|
||||
else if($months <= 12) {
|
||||
if($months == 1) { echo "1$mo_ago"; }
|
||||
else { echo "$months$mo_ago"; }
|
||||
}
|
||||
else if($years > 0) {
|
||||
if($years == 1) { echo "1yr"; }
|
||||
else { echo "$years$y_ago"; }
|
||||
}
|
||||
}
|
||||
//
|
||||
}
|
||||
}
|
||||
|
||||
if(!function_exists("safe")) {
|
||||
function safe($input) {
|
||||
global $conx;
|
||||
$valid_input = mysqli_real_escape_string($conx, trim(stripcslashes(htmlentities($input ,ENT_QUOTES, "UTF-8"))));
|
||||
return $valid_input;
|
||||
}
|
||||
}
|
||||
?>
|
||||
415
inc/conx.php
Normal file
415
inc/conx.php
Normal file
|
|
@ -0,0 +1,415 @@
|
|||
<?php
|
||||
# CONNECT TO THE DATABASE
|
||||
$conx = mysqli_connect("127.0.0.1","mdv5","ur own password here","mdv5");
|
||||
if (mysqli_connect_errno($conx)) {
|
||||
echo mysqli_connect_error();
|
||||
}
|
||||
# DEFINE BASIC INFO
|
||||
$ipaddr = $_SERVER['REMOTE_ADDR'];
|
||||
$uagent = $_SERVER['HTTP_USER_AGENT'];
|
||||
$tstamp = time();
|
||||
# CHECK TO SEE IF THE USER IS LOGGED IN
|
||||
if (isset($_COOKIE['akgnxoPwqlIs']) && isset($_COOKIE['LoILilzcnmwe']) && isset($_COOKIE['puTtxXvbEkOo'])) {
|
||||
$rstra = $_COOKIE['akgnxoPwqlIs'];
|
||||
$rstrb = $_COOKIE['LoILilzcnmwe'];
|
||||
$rstrc = $_COOKIE['puTtxXvbEkOo'];
|
||||
$cks = mysqli_query($conx, "SELECT rstringa,rstringb,rstringc FROM accounts WHERE rstringa='$rstra' && rstringb='$rstrb' && rstringc='$rstrc'");
|
||||
$ckcn = mysqli_num_rows($cks);
|
||||
if($ckcn > 0) {
|
||||
$logged_in = true;
|
||||
}
|
||||
else {
|
||||
$logged_in = false;
|
||||
}
|
||||
# STUFF FOR BEING LOGGED IN
|
||||
if($logged_in == true) {
|
||||
$x = mysqli_query($conx, "SELECT * FROM accounts WHERE rstringa='$rstra' && rstringb='$rstrb' && rstringc='$rstrc'");
|
||||
$y = mysqli_fetch_assoc($x);
|
||||
$u_uid = $y['uid'];
|
||||
if($u_uid == '812') {
|
||||
$u_uid = "871";
|
||||
}
|
||||
$u_verified = $y['verified'];
|
||||
if($u_verified != 'yes') {
|
||||
$kill = '';
|
||||
$msg = 'nvdjrj6jfnxalpowqnzaiywliz';
|
||||
setcookie("akgnxoPwqlIs", $kill, time()+3600*24*30, '/', '.misdew.com');
|
||||
setcookie("LoILilzcnmwe", $kill, time()+3600*24*30, '/', '.misdew.com');
|
||||
setcookie("puTtxXvbEkOo", $kill, time()+3600*24*30, '/', '.misdew.com');
|
||||
setcookie("hwsmnzeiopqm", $msg, time()+3600*24*30, '/', '.misdew.com');
|
||||
header("location: /");
|
||||
exit();
|
||||
}
|
||||
$u_username = $y['username'];
|
||||
if($u_username == 'DSi') {
|
||||
$u_username = "xperttheef";
|
||||
}
|
||||
$u_2fa = $y['2fa'];
|
||||
$u_cloudterms = $y['cloudterms'];
|
||||
$email_secure = $y['email_secure'];
|
||||
if($email_secure == '') {
|
||||
header("location: /checkpoint");
|
||||
exit();
|
||||
}
|
||||
$u_token = $y['token'];
|
||||
$u_lurker_mode = $y['lurker_mode'];
|
||||
if($u_lurker_mode == 'yes') {
|
||||
mysqli_query($conx, "UPDATE accounts SET chat_time='$tstamp'-300 WHERE uid='$u_uid'");
|
||||
mysqli_query($conx, "UPDATE accounts SET online_time='$tstamp'-300 WHERE uid='$u_uid'");
|
||||
}
|
||||
$u_hub_theme = $y['hub_theme'];
|
||||
$u_auth_app = $y['auth_app'];
|
||||
$u_auth_secret = $y['auth_secret'];
|
||||
$chat_dark = $y['chat_dark'];
|
||||
$u_theme = $y['theme'];
|
||||
$u_patreon = $y['perk_levelone'];
|
||||
$u_rank = $y['rank'];
|
||||
$u_chatyping = $y['chat_istyping'];
|
||||
$u_header_float = $y['header_float'];
|
||||
$u_chatdark_def = $y['u_chatdark_def'];
|
||||
$u_currip = $y['current_ip'];
|
||||
$u_joinstamp = $y['joinstamp'];
|
||||
$u_emoji_type = $y['emoji_type'];
|
||||
$u_can_mail = $y['who_can_mail'];
|
||||
$u_mail_rand = $y['mail_random_gen'];
|
||||
$u_siteloc = $y['site_locurl'];
|
||||
$u_bot = $y['bot'];
|
||||
$u_vplus = $y['vplus'];
|
||||
|
||||
$u_cloud_storage = $y['cloud_storage'];
|
||||
$u_cloud_usage = $y['cloud_usage'];
|
||||
|
||||
$u_chat_attack_hp = $y['chat_attack_hp'];
|
||||
|
||||
|
||||
$u_jailed = $y['jailed'];
|
||||
|
||||
|
||||
|
||||
if($u_chat_attack_hp <= 0 && $u_jailed == 'no') {
|
||||
mysqli_query($conx, "UPDATE accounts SET jailed='yes' WHERE uid='$u_uid'");
|
||||
// Total Jail Time
|
||||
$time_to_serve = time() + 120;
|
||||
mysqli_query($conx, "UPDATE accounts SET release_time='$time_to_serve' WHERE uid='$u_uid'");
|
||||
}
|
||||
|
||||
|
||||
|
||||
if($u_chat_attack_hp > 100) {
|
||||
mysqli_query($conx, "UPDATE accounts SET chat_attack_hp='100' WHERE uid='$u_uid'");
|
||||
}
|
||||
if($u_chat_attack_hp < 0) {
|
||||
mysqli_query($conx, "UPDATE accounts SET chat_attack_hp='0' WHERE uid='$u_uid'");
|
||||
}
|
||||
$u_comm_mang = $y['comm_mang'];
|
||||
$u_cont_mang = $y['cont_mang'];
|
||||
$u_design_pol = $y['design_police'];
|
||||
$u_peacekpr = $y['peacekeeper'];
|
||||
$u_css = $y['css'];
|
||||
$u_funds = $y['funds'];
|
||||
$u_funds_tru = $y['tru_funds'];
|
||||
$u_funds_btc = $y['btc_funds'];
|
||||
$u_funds_cake = $y['cake_funds'];
|
||||
$u_funds_dot = $y['dot_funds'];
|
||||
$u_uagent = $y['uagent'];
|
||||
$u_ads = $y['ads'];
|
||||
$u_datasaver = $y['data_saver'];
|
||||
$u_notifc = $y['notif_clear'];
|
||||
$u_sticker = $y['sticker'];
|
||||
$u_cmsgs = $y['total_cmsgs'];
|
||||
$u_csplit = $y['csplit'];
|
||||
$u_csplown = $y['csplit_own'];
|
||||
$u_hubmain = $y['hubmain'];
|
||||
$u_chatgames = $y['chat_games'];
|
||||
if($u_jailed == 'yes') {
|
||||
header("location: /jail");
|
||||
exit();
|
||||
}
|
||||
//echo "jarrett";
|
||||
$perrate = "per_rate";
|
||||
$uuuu = mysqli_query($conx, "SELECT * FROM chat_games WHERE game_uqid='$perrate'");
|
||||
$uooooo = mysqli_fetch_assoc($uuuu);
|
||||
$chat_msg_per_rate = $uooooo['msgs_since'];
|
||||
// update online record
|
||||
$rq = mysqli_query($conx, "SELECT category FROM apps WHERE id='13'");
|
||||
$da = mysqli_fetch_array($rq);
|
||||
$r_cnt = $da['category'];
|
||||
$new = $tstamp - 120;
|
||||
$sc_onl = mysqli_query($conx, "SELECT uid FROM accounts WHERE online_time >= $new ORDER BY username");
|
||||
$l_cnt = mysqli_num_rows($sc_onl);
|
||||
if ($l_cnt > $r_cnt) {
|
||||
mysqli_query($conx, "UPDATE apps SET category='$l_cnt' WHERE id='13'");
|
||||
}
|
||||
// update online record
|
||||
# UPDATE ONLINE TIME
|
||||
if($u_lurker_mode == 'no') {
|
||||
mysqli_query($conx, "UPDATE accounts SET online_time='$tstamp' WHERE uid='$u_uid'");
|
||||
}
|
||||
// UPDATE UAGENT
|
||||
mysqli_query($conx, "UPDATE accounts SET upd_uagent='$uagent' WHERE uid='$u_uid'");
|
||||
# STUFF FOR FIGURES
|
||||
$e = mysqli_query($conx, "SELECT activeness FROM account_figures WHERE uid='$u_uid'");
|
||||
$d = mysqli_fetch_assoc($e);
|
||||
$f_activeness = $d['activeness'];
|
||||
# UPDATE CURRENT IP IF IT DOES NOT MATCH IP FROM SERVER
|
||||
if($ipaddr != $u_currip) {
|
||||
mysqli_query($conx, "UPDATE accounts SET current_ip='$ipaddr' WHERE uid='$u_uid'");
|
||||
}
|
||||
# GET THE THEME
|
||||
$kds = mysqli_query($conx, "SELECT id,raw_css,href_stylesheet,main_metacolor,main_tdcolor FROM themes WHERE id='$u_theme'");
|
||||
$gds = mysqli_fetch_assoc($kds);
|
||||
$g_themeid = $gds['id'];
|
||||
$g_raw = $gds['raw_css'];
|
||||
$g_sheet = $gds['href_stylesheet'];
|
||||
$g_mainmeta = $gds['main_metacolor'];
|
||||
$g_maintd = $gds['main_tdcolor'];
|
||||
# IS THE THEME FROM RAW CSS OR A STYLESHEET
|
||||
if($g_sheet) {
|
||||
$css_type = "sheet";
|
||||
}
|
||||
else {
|
||||
$css_type = "raw";
|
||||
}
|
||||
# DEFAULT APPS THEME INFO
|
||||
|
||||
//$this_page = '';
|
||||
if($this_page) {
|
||||
$thm = mysqli_query($conx, "SELECT * FROM themes WHERE id='$u_theme'");
|
||||
$tms = mysqli_fetch_assoc($thm);
|
||||
$ccanvas = $tms['canvas'];
|
||||
$ccanvas_acc = $tms['canvas_acc'];
|
||||
$cfeed = $tms['feed'];
|
||||
$cfeed_acc = $tms['feed_acc'];
|
||||
$cchat = $tms['chat'];
|
||||
$cchat_acc = $tms['chat_acc'];
|
||||
$cmail = $tms['mail'];
|
||||
$cmail_acc = $tms['mail_acc'];
|
||||
$cthemes = $tms['themes'];
|
||||
$cthemes_acc = $tms['themes_acc'];
|
||||
$cblogs = $tms['blogs'];
|
||||
$cblogs_acc = $tms['blogs_acc'];
|
||||
$cforums = $tms['forums'];
|
||||
$cforums_acc = $tms['forums_acc'];
|
||||
$czones = $tms['zones'];
|
||||
$czones_acc = $tms['zones_acc'];
|
||||
$cdraw = $tms['draw'];
|
||||
$cdraw_acc = $tms['draw_acc'];
|
||||
$cmarket = $tms['market'];
|
||||
$cmarket_acc = $tms['market_acc'];
|
||||
$calerts = $tms['alerts'];
|
||||
$calerts_acc = $tms['alerts_acc'];
|
||||
$csettings = $tms['settings'];
|
||||
$csettings_acc = $tms['settings_acc'];
|
||||
$same_meta = $tms['same_meta'];
|
||||
if($this_page == "canvas") {
|
||||
// make sure meta theme color is filled
|
||||
if($ccanvas) {
|
||||
$meta_theme_color = $ccanvas;
|
||||
$tdcolor = $ccanvas_acc;
|
||||
}
|
||||
else {
|
||||
$meta_theme_color = $g_mainmeta;
|
||||
$tdcolor = $g_maintd;
|
||||
}
|
||||
$bgcolor = $meta_theme_color;
|
||||
}
|
||||
if($this_page == "feed") {
|
||||
// make sure meta theme color is filled
|
||||
if($cfeed) {
|
||||
$meta_theme_color = $cfeed;
|
||||
$tdcolor = $cfeed_acc;
|
||||
}
|
||||
else {
|
||||
$meta_theme_color = $g_mainmeta;
|
||||
$tdcolor = $g_maintd;
|
||||
}
|
||||
$bgcolor = $meta_theme_color;
|
||||
}
|
||||
if($this_page == "chat") {
|
||||
// make sure meta theme color is filled
|
||||
if($cchat) {
|
||||
$meta_theme_color = $cchat;
|
||||
$tdcolor = $cchat_acc;
|
||||
}
|
||||
else {
|
||||
$meta_theme_color = $g_mainmeta;
|
||||
$tdcolor = $g_maintd;
|
||||
}
|
||||
$bgcolor = $meta_theme_color;
|
||||
}
|
||||
if($this_page == "mail") {
|
||||
// make sure meta theme color is filled
|
||||
if($cmail) {
|
||||
$meta_theme_color = $cmail;
|
||||
$tdcolor = $cmail_acc;
|
||||
}
|
||||
else {
|
||||
$meta_theme_color = $g_mainmeta;
|
||||
$tdcolor = $g_maintd;
|
||||
}
|
||||
$bgcolor = $meta_theme_color;
|
||||
}
|
||||
if($this_page == "themes") {
|
||||
// make sure meta theme color is filled
|
||||
if($cthemes) {
|
||||
$meta_theme_color = $cthemes;
|
||||
$tdcolor = $cthemes_acc;
|
||||
}
|
||||
else {
|
||||
$meta_theme_color = $g_mainmeta;
|
||||
$tdcolor = $g_maintd;
|
||||
}
|
||||
$bgcolor = $meta_theme_color;
|
||||
}
|
||||
if($this_page == "blogs") {
|
||||
// make sure meta theme color is filled
|
||||
if($cblogs) {
|
||||
$meta_theme_color = $cblogs;
|
||||
$tdcolor = $cblogs_acc;
|
||||
}
|
||||
else {
|
||||
$meta_theme_color = $g_mainmeta;
|
||||
$tdcolor = $g_maintd;
|
||||
}
|
||||
$bgcolor = $meta_theme_color;
|
||||
}
|
||||
if($this_page == "forums") {
|
||||
// make sure meta theme color is filled
|
||||
if($cforums) {
|
||||
$meta_theme_color = $cforums;
|
||||
$tdcolor = $cforums_acc;
|
||||
}
|
||||
else {
|
||||
$meta_theme_color = $g_mainmeta;
|
||||
$tdcolor = $g_maintd;
|
||||
}
|
||||
$bgcolor = $meta_theme_color;
|
||||
}
|
||||
if($this_page == "zones") {
|
||||
// make sure meta theme color is filled
|
||||
if($czones) {
|
||||
$meta_theme_color = $czones;
|
||||
$tdcolor = $czones_acc;
|
||||
}
|
||||
else {
|
||||
$meta_theme_color = $g_mainmeta;
|
||||
$tdcolor = $g_maintd;
|
||||
}
|
||||
$bgcolor = $meta_theme_color;
|
||||
}
|
||||
if($this_page == "draw") {
|
||||
// make sure meta theme color is filled
|
||||
if($cdraw) {
|
||||
$meta_theme_color = $cdraw;
|
||||
$tdcolor = $cdraw_acc;
|
||||
}
|
||||
else {
|
||||
$meta_theme_color = $g_mainmeta;
|
||||
$tdcolor = $g_maintd;
|
||||
}
|
||||
$bgcolor = $meta_theme_color;
|
||||
}
|
||||
if($this_page == "market") {
|
||||
// make sure meta theme color is filled
|
||||
if($cmarket) {
|
||||
$meta_theme_color = $cmarket;
|
||||
$tdcolor = $cmarket_acc;
|
||||
}
|
||||
else {
|
||||
$meta_theme_color = $g_mainmeta;
|
||||
$tdcolor = $g_maintd;
|
||||
}
|
||||
$bgcolor = $meta_theme_color;
|
||||
}
|
||||
if($this_page == "alerts") {
|
||||
// make sure meta theme color is filled
|
||||
if($calerts) {
|
||||
$meta_theme_color = $calerts;
|
||||
$tdcolor = $calerts_acc;
|
||||
}
|
||||
else {
|
||||
$meta_theme_color = $g_mainmeta;
|
||||
$tdcolor = $g_maintd;
|
||||
}
|
||||
$bgcolor = $meta_theme_color;
|
||||
}
|
||||
if($this_page == "settings") {
|
||||
// make sure meta theme color is filled
|
||||
if($csettings) {
|
||||
$meta_theme_color = $csettings;
|
||||
$tdcolor = $csettings_acc;
|
||||
}
|
||||
else {
|
||||
$meta_theme_color = $g_mainmeta;
|
||||
$tdcolor = $g_maintd;
|
||||
}
|
||||
$bgcolor = $meta_theme_color;
|
||||
}
|
||||
if($same_meta) {
|
||||
$meta_theme_color = $same_meta;
|
||||
}
|
||||
}
|
||||
else {
|
||||
$meta_theme_color = $g_mainmeta;
|
||||
}
|
||||
# GET THE USER'S THEME COLORS FOR THEIR USERNAME AND TEXT COLOR
|
||||
$usri_q = mysqli_query($conx, "SELECT username_color,text_color,csplit1_color,csplit2_color,csplit3_color,csplit1_name,csplit2_name,csplit3_name FROM user_theme_colors WHERE uid='$u_uid' && theme_id='$g_themeid'");
|
||||
while($usri_r = mysqli_fetch_assoc($usri_q)) {
|
||||
$u_ucolor = $usri_r['username_color'];
|
||||
$u_tcolor = $usri_r['text_color'];
|
||||
$u_cspcolor1 = $usri_r['csplit1_color'];
|
||||
$u_cspcolor2 = $usri_r['csplit2_color'];
|
||||
$u_cspcolor3 = $usri_r['csplit3_color'];
|
||||
$u_cspname1 = $usri_r['csplit1_name'];
|
||||
$u_cspname2 = $usri_r['csplit2_name'];
|
||||
$u_cspname3 = $usri_r['csplit3_name'];
|
||||
}
|
||||
//
|
||||
function timeago($session_time) {
|
||||
$time_difference = time() - $session_time;
|
||||
$seconds = $time_difference;
|
||||
$minutes = round($time_difference/60);
|
||||
$hours = round($time_difference/3600);
|
||||
$days = round($time_difference/86400);
|
||||
$weeks = round($time_difference/604800);
|
||||
$months = round($time_difference/2419200);
|
||||
$years = round($time_difference/29030400);
|
||||
$s_ago = "s"; $mo_ago = "mo"; $y_ago = "yrs"; $m_ago = "m"; $h_ago = "h"; $w_ago = "w"; $d_ago = "d";
|
||||
if($seconds <= 59) { echo "$seconds$s_ago"; }
|
||||
else if($minutes <= 59) {
|
||||
if($minutes == 1) { echo "1$m_ago"; }
|
||||
else { echo "$minutes$m_ago"; }
|
||||
}
|
||||
else if($hours <= 23) {
|
||||
if($hours == 1) { echo "1$h_ago"; }
|
||||
else { echo "$hours$h_ago"; }
|
||||
}
|
||||
else if($days <= 6) {
|
||||
if($days == 1) { echo "1$d_ago"; }
|
||||
else { echo "$days$d_ago"; }
|
||||
}
|
||||
else if($weeks <= 4) {
|
||||
if($weeks == 1) { echo "1$w_ago"; }
|
||||
else { echo "$weeks$w_ago"; }
|
||||
}
|
||||
else if($months <= 12) {
|
||||
if($months == 1) { echo "1$mo_ago"; }
|
||||
else { echo "$months$mo_ago"; }
|
||||
}
|
||||
else if($years > 0) {
|
||||
if($years == 1) { echo "1yr"; }
|
||||
else { echo "$years$y_ago"; }
|
||||
}
|
||||
}
|
||||
//
|
||||
}
|
||||
}
|
||||
require_once("functions.php");
|
||||
if(!function_exists("safe")) {
|
||||
function safe($input) {
|
||||
global $conx;
|
||||
$valid_input = mysqli_real_escape_string($conx, trim(stripcslashes(htmlentities($input ,ENT_QUOTES, "UTF-8"))));
|
||||
return $valid_input;
|
||||
}
|
||||
}
|
||||
?>
|
||||
19
inc/dismiss.php
Normal file
19
inc/dismiss.php
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
require_once("../inc/conx.php");
|
||||
$gtoken = safe($_GET['t']);
|
||||
$gid = safe($_GET['i']);
|
||||
if($gtoken == $u_token && $logged_in == true && $gid) {
|
||||
$ver = mysqli_query($conx, "SELECT uid,app_uqid FROM notifs WHERE id='$gid'");
|
||||
$s = mysqli_fetch_assoc($ver);
|
||||
$notif_uid = $s['uid'];
|
||||
$napp_uqid = $s['app_uqid'];
|
||||
if($notif_uid == $u_uid) {
|
||||
mysqli_query($conx, "DELETE FROM notifs WHERE id='$gid'");
|
||||
exit();
|
||||
}
|
||||
exit();
|
||||
}
|
||||
else {
|
||||
exit();
|
||||
}
|
||||
?>
|
||||
12
inc/footer.php
Normal file
12
inc/footer.php
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<br>
|
||||
<?php
|
||||
if($logged_in == 'true') {
|
||||
if($u_ads != 'no') {
|
||||
}
|
||||
}
|
||||
else {
|
||||
}
|
||||
?>
|
||||
<a id="patreon_link" class="footer" href="https://discord.gg/Dn7Xf42cTB" alt="" style="font-weight: bold; text-decoration: none;">Misdew Discord Server <i class="fa fa-external-link-square"></i></a> <br>
|
||||
<a id="patreon_link" class="footer" href="https://patreon.com/misdew" alt="" style="font-weight: bold; text-decoration: none;">Support via Patreon <i class="fa fa-external-link-square"></i></a> <br>
|
||||
<span id="footer_copyright" class="footer">© Copyright Misdew</span>
|
||||
118
inc/functions.php
Normal file
118
inc/functions.php
Normal file
|
|
@ -0,0 +1,118 @@
|
|||
<?php
|
||||
require_once("conx.php");
|
||||
function safe($input) {
|
||||
global $conx;
|
||||
$valid_input = mysqli_real_escape_string($conx, trim(stripcslashes(htmlentities($input ,ENT_QUOTES, "UTF-8"))));
|
||||
return $valid_input;
|
||||
}
|
||||
function atname($texto) {
|
||||
$texto = $texto;
|
||||
$a = array("/(|s)@(w*[A-Za-z0-9_]+w*)/");
|
||||
$b = array("$1<a href='/canvas/$2' style='color:#000;text-decoration:none;font-weight:bold;'>@$2</a>");
|
||||
$texto = preg_replace($a, $b, $texto);
|
||||
return $texto;
|
||||
}
|
||||
function clickurl($text){
|
||||
return preg_replace('!(((f|ht)tp(s)?://)[-a-zA-Zа-яА-Я()0-9@:%_+.~#?&;//=]+)!i', '<a href="$1" style="color: blue; text-decoration: none;" target="_blank">$1</a>', $text);
|
||||
}
|
||||
if($u_datasaver == 'on') {
|
||||
function bbc($text) {
|
||||
$find = array(
|
||||
'~\[center\](.*?)\[/center\]~s',
|
||||
'~\[left\](.*?)\[/left\]~s',
|
||||
'~\[right\](.*?)\[/right\]~s',
|
||||
'~\[spoiler=(.*?)\](.*?)\[/spoiler\]~s',
|
||||
'~\[spoiler\](.*?)\[/spoiler\]~s',
|
||||
'~\[b\](.*?)\[/b\]~s',
|
||||
'~\[i\](.*?)\[/i\]~s',
|
||||
'~\[u\](.*?)\[/u\]~s',
|
||||
'~\[s\](.*?)\[/s\]~s',
|
||||
'~\[quote\](.*?)\[/quote\]~s',
|
||||
'~\[size=([0-9]*?)\](.*?)\[/size\]~s',
|
||||
'~\[color=([#A-z0-9]*?)\](.*?)\[/color\]~s',
|
||||
'~\[link=((?:ftp|https?)://[A-z0-9].*?)\](.*?)\[/link\]~s',
|
||||
'~\[img\](.*?)\[/img\]~s',
|
||||
'~\[img=(.*?)\ (.*?)\](.*?)\[/img\]~s',
|
||||
'~\[youtube\](.*?)\[/youtube\]~s',
|
||||
'~\[yt\](.*?)\[/yt\]~s',
|
||||
'~\[dailymotion\](.*?)\[/dailymotion\]~s',
|
||||
'~\[dm\](.*?)\[/dm\]~s',
|
||||
'~\[video\](.*?)\[/video\]~s'
|
||||
);
|
||||
$replace = array(
|
||||
"<center>$1</center>",
|
||||
"<div style=\"text-align:left;\">$1</div>",
|
||||
"<div style=\"text-align:right;\">$1</div>",
|
||||
"<div class=\"spoiler\"><span style=\"font-weight: bold;\">$1</span> <span onclick=\"showSpoiler(this);\" style=\"float: right;\"><i class=\"fa fa-eye\" aria-hidden=\"true\"></i></span><div class=\"spoiler_hidden\" style=\"display:none;\">$2</div></div>",
|
||||
"<div class=\"spoiler\"><span style=\"font-weight: bold;\">Spoiler</span> <span onclick=\"showSpoiler(this);\" style=\"float: right;\"><i class=\"fa fa-eye\" aria-hidden=\"true\"></i></span><div class=\"spoiler_hidden\" style=\"display:none;\">$1</div></div>",
|
||||
"<b>$1</b>",
|
||||
"<i>$1</i>",
|
||||
"<span style=\"text-decoration:underline;\">$1</span>",
|
||||
"<span style=\"text-decoration:line-through;\">$1</span>",
|
||||
"<pre>$1</pre>",
|
||||
"<span style=\"font-size:$1px;\">$2</span>",
|
||||
"<span style=\"color:$1;\">$2</span>",
|
||||
"<a href=\"$1\" style=\"color: blue; text-decoration: none;\">$2</a>",
|
||||
"<a href=\"$1\" style=\"color: blue; text-decoration: none;\">[view image]</a>",
|
||||
"<a href=\"$3\" style=\"color: blue; text-decoration: none;\">[view image]</a>",
|
||||
"<a href=\"https://www.youtube.com/watch?v=$1\" style=\"color: blue; text-decoration: none;\">[view YouTube video]</a>",
|
||||
"<a href=\"https://www.youtube.com/watch?v=$1\" style=\"color: blue; text-decoration: none;\">[view YouTube video]</a>",
|
||||
"<a href=\"https://www.dailymotion.com/video/$1\" style=\"color: blue; text-decoration: none;\">[view DailyMotion video]</a>",
|
||||
"<a href=\"https://www.dailymotion.com/video/$1\" style=\"color: blue; text-decoration: none;\">[view DailyMotion video]</a>",
|
||||
"<a href=\"$1\" style=\"color: blue; text-decoration: none;\">[view video]</a>"
|
||||
);
|
||||
$text = preg_replace($find, $replace, $text);
|
||||
return $text;
|
||||
}
|
||||
}
|
||||
else {
|
||||
function bbc($text) {
|
||||
$find = array(
|
||||
'~\[center\](.*?)\[/center\]~s',
|
||||
'~\[left\](.*?)\[/left\]~s',
|
||||
'~\[right\](.*?)\[/right\]~s',
|
||||
'~\[spoiler=(.*?)\](.*?)\[/spoiler\]~s',
|
||||
'~\[spoiler\](.*?)\[/spoiler\]~s',
|
||||
'~\[b\](.*?)\[/b\]~s',
|
||||
'~\[i\](.*?)\[/i\]~s',
|
||||
'~\[u\](.*?)\[/u\]~s',
|
||||
'~\[s\](.*?)\[/s\]~s',
|
||||
'~\[quote\](.*?)\[/quote\]~s',
|
||||
'~\[size=([0-9]*?)\](.*?)\[/size\]~s',
|
||||
'~\[color=([#A-z0-9]*?)\](.*?)\[/color\]~s',
|
||||
'~\[link=((?:ftp|https?)://[A-z0-9].*?)\](.*?)\[/link\]~s',
|
||||
'~\[img\](.*?)\[/img\]~s',
|
||||
'~\[img=(.*?)\ (.*?)\](.*?)\[/img\]~s',
|
||||
'~\[youtube\](.*?)\[/youtube\]~s',
|
||||
'~\[yt\](.*?)\[/yt\]~s',
|
||||
'~\[dailymotion\](.*?)\[/dailymotion\]~s',
|
||||
'~\[dm\](.*?)\[/dm\]~s',
|
||||
'~\[video\](.*?)\[/video\]~s'
|
||||
);
|
||||
$replace = array(
|
||||
"<center>$1</center>",
|
||||
"<div style=\"text-align:left;\">$1</div>",
|
||||
"<div style=\"text-align:right;\">$1</div>",
|
||||
"<div class=\"spoiler\"><span style=\"font-weight: bold;\">$1</span> <span onclick=\"showSpoiler(this);\" style=\"float: right;\"><i class=\"fa fa-eye\" aria-hidden=\"true\"></i></span><div class=\"spoiler_hidden\" style=\"display:none;\">$2</div></div>",
|
||||
"<div class=\"spoiler\"><span style=\"font-weight: bold;\">Spoiler</span> <span onclick=\"showSpoiler(this);\" style=\"float: right;\"><i class=\"fa fa-eye\" aria-hidden=\"true\"></i></span><div class=\"spoiler_hidden\" style=\"display:none;\">$1</div></div>",
|
||||
"<b>$1</b>",
|
||||
"<i>$1</i>",
|
||||
"<span style=\"text-decoration:underline;\">$1</span>",
|
||||
"<span style=\"text-decoration:line-through;\">$1</span>",
|
||||
"<pre>$1</pre>",
|
||||
"<span style=\"font-size:$1px;\">$2</span>",
|
||||
"<span style=\"color:$1;\">$2</span>",
|
||||
"<a href=\"$1\" style=\"color: blue; text-decoration: none;\">$2</a>",
|
||||
"<img src=\"$1\" alt=\"\" style=\"width: 80%; max-width: 100%;\">",
|
||||
"<img src=\"$3\" alt=\"\" style=\"width: $1; height: $2; max-width: 100%;\">",
|
||||
"<center><object data=\"https://www.youtube.com/embed/$1\" style=\"max-width: 100%;\"></object></center>",
|
||||
"<center><object data=\"https://www.youtube.com/embed/$1\" style=\"max-width: 100%;\"></object></center>",
|
||||
"<center><object data=\"//www.dailymotion.com/embed/video/$1?autoPlay=0\" style=\"max-width: 100%;\"></object></center>",
|
||||
"<center><object data=\"//www.dailymotion.com/embed/video/$1?autoPlay=0\" style=\"max-width: 100%;\"></object></center>",
|
||||
"<video playsinline preload=\"metadata\" style=\"background-color: #000;width: 80%; height: auto;\" controls src=\"$1\" preload=\"metadata\"> </video>"
|
||||
);
|
||||
$text = preg_replace($find, $replace, $text);
|
||||
return $text;
|
||||
}
|
||||
}
|
||||
?>
|
||||
114
inc/header-dark.php
Normal file
114
inc/header-dark.php
Normal file
|
|
@ -0,0 +1,114 @@
|
|||
<?php
|
||||
if($u_header_float == "on") {
|
||||
$header_div_xtra = " style=\"position: fixed;left: 50%; transform: translate(-50%, 0); z-index: 100;\"";
|
||||
}
|
||||
?><div class="header"<?php echo $header_div_xtra; ?>>
|
||||
<table style="width: 100%; text-align: center;">
|
||||
<tr>
|
||||
<?php
|
||||
/*if($back_button == true) {
|
||||
echo '<td style="padding-left: 15px;" onclick="window.window.history.go(-1); return false;"><i id="header_tds" class="fa fa-arrow-left" aria-hidden="true"></i></td>';
|
||||
}
|
||||
else {
|
||||
echo '<td style="padding-left: 15px;"><i id="header_tds" class="fa fa-arrow-left" aria-hidden="true" style="color: transparent !important;"></i></td>';
|
||||
}*/
|
||||
$extra = mysqli_query($conx, "SELECT uid FROM notifs WHERE uid='$u_uid' && viewed='no' ORDER BY id");
|
||||
$ncount = mysqli_num_rows($extra);
|
||||
if($ncount > 0) {
|
||||
$alert_bell_color = "#939393";
|
||||
}
|
||||
if($ncount <= 0) {
|
||||
$ncount = "";
|
||||
}
|
||||
echo "<td id=\"alertbell\" onclick=\"window.location='/alerts';\" style=\"padding-left: 15px;\"><i id=\"header_tds\" style=\"color: $alert_bell_color !important;\" class=\"fa fa-bell\" aria-hidden=\"true\"></i></td>";
|
||||
?>
|
||||
<td style="width: 100%;" onclick="window.location='/hub';"><img class="mdv5_header" src="/img/header-dark.png" alt="" style="width: 40%; padding-top: 5px;"></td>
|
||||
<td style="padding-right: 15px;" onclick="var log_conf=confirm('Are you sure you really want to logout? \nWhy not stay logged in? \nFine, go ahead. \nLogout?');if(log_conf == true){window.location='/logout?t=<?php echo $u_token; ?>';}"><i id="header_tds" class="fa fa-sign-out" aria-hidden="true"></i></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<?php
|
||||
if($u_header_float == "on") {
|
||||
echo "
|
||||
|
||||
<div class=\"header\" style=\"width: 100%; max-width: 600px;\">
|
||||
<table style=\"width: 100%; text-align: center;\">
|
||||
<tr>";
|
||||
|
||||
/* if($back_button == true) {
|
||||
echo '<td style="padding-left: 15px;" onclick="window.window.history.go(-1); return false;"><i id="header_tds" class="fa fa-arrow-left" aria-hidden="true"></i></td>';
|
||||
}
|
||||
else {
|
||||
echo '<td style="padding-left: 15px;"><i id="header_tds" class="fa fa-arrow-left" aria-hidden="true" style="color: transparent !important;"></i></td>';
|
||||
}*/
|
||||
/*if($back_button == true) {
|
||||
echo '<td style="padding-left: 15px;" onclick="window.window.history.go(-1); return false;"><i id="header_tds" class="fa fa-arrow-left" aria-hidden="true"></i></td>';
|
||||
}
|
||||
else {
|
||||
echo '<td style="padding-left: 15px;"><i id="header_tds" class="fa fa-arrow-left" aria-hidden="true" style="color: transparent !important;"></i></td>';
|
||||
}*/
|
||||
$extra = mysqli_query($conx, "SELECT uid FROM notifs WHERE uid='$u_uid' && viewed='no' ORDER BY id");
|
||||
$ncount = mysqli_num_rows($extra);
|
||||
if($ncount > 0) {
|
||||
$alert_bell_color = "#939393";
|
||||
}
|
||||
if($ncount <= 0) {
|
||||
$ncount = "";
|
||||
}
|
||||
echo "<td id=\"alertbell_r\" onclick=\"window.location='/alerts';\" style=\"padding-left: 15px;\"><i id=\"header_tds\" style=\"color: $alert_bell_color !important;\" class=\"fa fa-bell\" aria-hidden=\"true\"></i></td>";
|
||||
echo "
|
||||
<td style=\"width: 100%;\" onclick=\"window.location='/hub';\"><img class=\"mdv5_header\" src=\"/img/header-dark.png\" alt=\"\" style=\"width: 40%; padding-top: 5px;\"></td>
|
||||
<td style=\"padding-right: 15px;\" onclick=\"var log_conf=confirm('Are you sure you really want to logout? \nWhy not stay logged in? \nFine, go ahead. \nLogout?');if(log_conf == true){window.location='/logout?t=$u_token';}\"><i id=\"header_tds\" class=\"fa fa-sign-out\" aria-hidden=\"true\"></i></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
";
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
if($linebreak == true) {
|
||||
echo "<br>";
|
||||
}
|
||||
if($logged_in == true) {
|
||||
if($alerts == true) {
|
||||
if($this_page != 'alerts' && $this_page != 'home') {
|
||||
//echo "<div id=\"ld_alerts\">";
|
||||
//include_once("../inc/alerts.php");
|
||||
//echo "</div>";
|
||||
//echo "<script>setInterval('upAlerts()', 10000);</script>";
|
||||
}
|
||||
}
|
||||
if($this_page != 'chat' && $this_page != 'mail') {
|
||||
echo "<script>function expand(id) {
|
||||
var e = document.getElementById(id);
|
||||
if(e.style.display == 'block')
|
||||
e.style.display = 'none';
|
||||
else
|
||||
e.style.display = 'block';
|
||||
}</script>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
<script src="https://misdew.com/inc/jquery.min.js"></script>
|
||||
<script>
|
||||
function showSpoiler(obj) {
|
||||
var spoiler_hidden = obj.parentNode.getElementsByTagName("div")[0];
|
||||
if(spoiler_hidden.style.display == "none") {
|
||||
spoiler_hidden.style.display = "";
|
||||
obj.innerHTML = "<i class=\"fa fa-eye-slash\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
else {
|
||||
spoiler_hidden.style.display = "none";
|
||||
obj.innerHTML = "<i class=\"fa fa-eye\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
}
|
||||
function upAlertBell() {
|
||||
$.get("/inc/alertbell-dark.php", function(d) {
|
||||
$("#alertbell").html(d);
|
||||
$("#alertbell_r").html(d);
|
||||
});
|
||||
}
|
||||
setInterval('upAlertBell()', 5000);
|
||||
</script>
|
||||
82
inc/header-v6.php
Normal file
82
inc/header-v6.php
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
<?php
|
||||
if($u_header_float == "on") {
|
||||
$header_div_xtra = "position: fixed;left: 50%; transform: translate(-50%, 0); z-index: 100;";
|
||||
}
|
||||
?><div class="header" style="box-shadow: 0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22);<?php echo $header_div_xtra; ?>">
|
||||
<table style="width: 100%; text-align: center;">
|
||||
<tr>
|
||||
<?php
|
||||
if($back_button == true) {
|
||||
echo '<td style="padding-left: 15px;" onclick="window.window.history.go(-1); return false;"><i id="header_tds" class="fa fa-arrow-left" aria-hidden="true"></i></td>';
|
||||
}
|
||||
else {
|
||||
echo '<td style="padding-left: 15px;"><i id="header_tds" class="fa fa-arrow-left" aria-hidden="true" style="color: transparent !important;"></i></td>';
|
||||
}
|
||||
?>
|
||||
<td style="width: 100%;" onclick="window.location='/hub';"><img class="mdv5_header" src="/img/header.png" alt="" style="width: 40%; padding-top: 5px;"></td>
|
||||
<td style="padding-right: 15px;" onclick="var log_conf=confirm('Are you sure you really want to logout? \nWhy not stay logged in? \nFine, go ahead. \nLogout?');if(log_conf == true){window.location='/logout?t=<?php echo $u_token; ?>';}"><i id="header_tds" class="fa fa-sign-out" aria-hidden="true"></i></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<?php
|
||||
if($u_header_float == "on") {
|
||||
echo "
|
||||
|
||||
<div class=\"header\" style=\"width: 100%; max-width: 600px;\">
|
||||
<table style=\"width: 100%; text-align: center;\">
|
||||
<tr>";
|
||||
|
||||
if($back_button == true) {
|
||||
echo '<td style="padding-left: 15px;" onclick="window.window.history.go(-1); return false;"><i id="header_tds" class="fa fa-arrow-left" aria-hidden="true"></i></td>';
|
||||
}
|
||||
else {
|
||||
echo '<td style="padding-left: 15px;"><i id="header_tds" class="fa fa-arrow-left" aria-hidden="true" style="color: transparent !important;"></i></td>';
|
||||
}
|
||||
echo "
|
||||
<td style=\"width: 100%;\" onclick=\"window.location='/hub';\"><img class=\"mdv5_header\" src=\"/img/header.png\" alt=\"\" style=\"width: 40%; padding-top: 5px;\"></td>
|
||||
<td style=\"padding-right: 15px;\" onclick=\"var log_conf=confirm('Are you sure you really want to logout? \nWhy not stay logged in? \nFine, go ahead. \nLogout?');if(log_conf == true){window.location='/logout?t=$u_token';}\"><i id=\"header_tds\" class=\"fa fa-sign-out\" aria-hidden=\"true\"></i></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
";
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
if($linebreak == true) {
|
||||
echo "<br>";
|
||||
}
|
||||
if($logged_in == true) {
|
||||
if($alerts == true) {
|
||||
if($this_page != 'alerts' && $this_page != 'home') {
|
||||
echo "<div id=\"ld_alerts\">";
|
||||
include_once("../inc/alerts.php");
|
||||
echo "</div>";
|
||||
echo "<script>setInterval('upAlerts()', 10000);</script>";
|
||||
}
|
||||
}
|
||||
if($this_page != 'chat' && $this_page != 'mail') {
|
||||
echo "<script>function expand(id) {
|
||||
var e = document.getElementById(id);
|
||||
if(e.style.display == 'block')
|
||||
e.style.display = 'none';
|
||||
else
|
||||
e.style.display = 'block';
|
||||
}</script>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
<script>
|
||||
function showSpoiler(obj) {
|
||||
var spoiler_hidden = obj.parentNode.getElementsByTagName("div")[0];
|
||||
if(spoiler_hidden.style.display == "none") {
|
||||
spoiler_hidden.style.display = "";
|
||||
obj.innerHTML = "<i class=\"fa fa-eye-slash\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
else {
|
||||
spoiler_hidden.style.display = "none";
|
||||
obj.innerHTML = "<i class=\"fa fa-eye\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
}
|
||||
</script>
|
||||
82
inc/header-wide.php
Normal file
82
inc/header-wide.php
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
<?php
|
||||
if($u_header_float == "on") {
|
||||
$header_div_xtra = " style=\"position: fixed;left: 50%; transform: translate(-50%, 0); z-index: 100; max-width: none !important;\"";
|
||||
}
|
||||
?><div class="header"<?php echo $header_div_xtra; ?>>
|
||||
<table style="width: 100%; text-align: center;">
|
||||
<tr>
|
||||
<?php
|
||||
if($back_button == true) {
|
||||
echo '<td style="padding-left: 15px;" onclick="window.window.history.go(-1); return false;"><i id="header_tds" class="fa fa-arrow-left" aria-hidden="true"></i></td>';
|
||||
}
|
||||
else {
|
||||
echo '<td style="padding-left: 15px;"><i id="header_tds" class="fa fa-arrow-left" aria-hidden="true" style="color: transparent !important;"></i></td>';
|
||||
}
|
||||
?>
|
||||
<td style="width: 100%;" onclick="window.location='/hub';"><img class="mdv5_header" src="/img/header.png" alt="" style="width: 15%; padding-top: 5px;"></td>
|
||||
<td style="padding-right: 15px;" onclick="var log_conf=confirm('Are you sure you really want to logout? \nWhy not stay logged in? \nFine, go ahead. \nLogout?');if(log_conf == true){window.location='/logout?t=<?php echo $u_token; ?>';}"><i id="header_tds" class="fa fa-sign-out" aria-hidden="true"></i></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<?php
|
||||
if($u_header_float == "on") {
|
||||
echo "
|
||||
|
||||
<div class=\"header\" style=\"width: 100%; max-width: none !important;\">
|
||||
<table style=\"width: 100%; text-align: center;\">
|
||||
<tr>";
|
||||
|
||||
if($back_button == true) {
|
||||
echo '<td style="padding-left: 15px;" onclick="window.window.history.go(-1); return false;"><i id="header_tds" class="fa fa-arrow-left" aria-hidden="true"></i></td>';
|
||||
}
|
||||
else {
|
||||
echo '<td style="padding-left: 15px;"><i id="header_tds" class="fa fa-arrow-left" aria-hidden="true" style="color: transparent !important;"></i></td>';
|
||||
}
|
||||
echo "
|
||||
<td style=\"width: 100%;\" onclick=\"window.location='/hub';\"><img class=\"mdv5_header\" src=\"/img/header.png\" alt=\"\" style=\"width: 15%; padding-top: 5px;\"></td>
|
||||
<td style=\"padding-right: 15px;\" onclick=\"var log_conf=confirm('Are you sure you really want to logout? \nWhy not stay logged in? \nFine, go ahead. \nLogout?');if(log_conf == true){window.location='/logout?t=$u_token';}\"><i id=\"header_tds\" class=\"fa fa-sign-out\" aria-hidden=\"true\"></i></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
";
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
if($linebreak == true) {
|
||||
echo "<br>";
|
||||
}
|
||||
if($logged_in == true) {
|
||||
if($alerts == true) {
|
||||
if($this_page != 'alerts' && $this_page != 'home') {
|
||||
echo "<div id=\"ld_alerts\">";
|
||||
include_once("../inc/alerts.php");
|
||||
echo "</div>";
|
||||
echo "<script>setInterval('upAlerts()', 10000);</script>";
|
||||
}
|
||||
}
|
||||
if($this_page != 'chat' && $this_page != 'mail') {
|
||||
echo "<script>function expand(id) {
|
||||
var e = document.getElementById(id);
|
||||
if(e.style.display == 'block')
|
||||
e.style.display = 'none';
|
||||
else
|
||||
e.style.display = 'block';
|
||||
}</script>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
<script>
|
||||
function showSpoiler(obj) {
|
||||
var spoiler_hidden = obj.parentNode.getElementsByTagName("div")[0];
|
||||
if(spoiler_hidden.style.display == "none") {
|
||||
spoiler_hidden.style.display = "";
|
||||
obj.innerHTML = "<i class=\"fa fa-eye-slash\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
else {
|
||||
spoiler_hidden.style.display = "none";
|
||||
obj.innerHTML = "<i class=\"fa fa-eye\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
}
|
||||
</script>
|
||||
114
inc/header.php
Normal file
114
inc/header.php
Normal file
|
|
@ -0,0 +1,114 @@
|
|||
<?php
|
||||
if($u_header_float == "on") {
|
||||
$header_div_xtra = " style=\"position: fixed;left: 50%; transform: translate(-50%, 0); z-index: 100;\"";
|
||||
}
|
||||
?><div class="header"<?php echo $header_div_xtra; ?>>
|
||||
<table style="width: 100%; text-align: center;">
|
||||
<tr>
|
||||
<?php
|
||||
/*if($back_button == true) {
|
||||
echo '<td style="padding-left: 15px;" onclick="window.window.history.go(-1); return false;"><i id="header_tds" class="fa fa-arrow-left" aria-hidden="true"></i></td>';
|
||||
}
|
||||
else {
|
||||
echo '<td style="padding-left: 15px;"><i id="header_tds" class="fa fa-arrow-left" aria-hidden="true" style="color: transparent !important;"></i></td>';
|
||||
}*/
|
||||
$extra = mysqli_query($conx, "SELECT uid FROM notifs WHERE uid='$u_uid' && viewed='no' ORDER BY id");
|
||||
$ncount = mysqli_num_rows($extra);
|
||||
if($ncount > 0) {
|
||||
$alert_bell_color = "#ffff99";
|
||||
}
|
||||
if($ncount <= 0) {
|
||||
$ncount = "";
|
||||
}
|
||||
echo "<td id=\"alertbell\" onclick=\"window.location='/alerts';\" style=\"padding-left: 15px;\"><i id=\"header_tds\" style=\"color: $alert_bell_color !important;\" class=\"fa fa-bell\" aria-hidden=\"true\"></i></td>";
|
||||
?>
|
||||
<td style="width: 100%;" onclick="window.location='/hub';"><img class="mdv5_header" src="/img/header.png" alt="" style="width: 40%; padding-top: 5px;"></td>
|
||||
<td style="padding-right: 15px;" onclick="var log_conf=confirm('Are you sure you really want to logout? \nWhy not stay logged in? \nFine, go ahead. \nLogout?');if(log_conf == true){window.location='/logout?t=<?php echo $u_token; ?>';}"><i id="header_tds" class="fa fa-sign-out" aria-hidden="true"></i></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<?php
|
||||
if($u_header_float == "on") {
|
||||
echo "
|
||||
|
||||
<div class=\"header\" style=\"width: 100%; max-width: 600px;\">
|
||||
<table style=\"width: 100%; text-align: center;\">
|
||||
<tr>";
|
||||
|
||||
/* if($back_button == true) {
|
||||
echo '<td style="padding-left: 15px;" onclick="window.window.history.go(-1); return false;"><i id="header_tds" class="fa fa-arrow-left" aria-hidden="true"></i></td>';
|
||||
}
|
||||
else {
|
||||
echo '<td style="padding-left: 15px;"><i id="header_tds" class="fa fa-arrow-left" aria-hidden="true" style="color: transparent !important;"></i></td>';
|
||||
}*/
|
||||
/*if($back_button == true) {
|
||||
echo '<td style="padding-left: 15px;" onclick="window.window.history.go(-1); return false;"><i id="header_tds" class="fa fa-arrow-left" aria-hidden="true"></i></td>';
|
||||
}
|
||||
else {
|
||||
echo '<td style="padding-left: 15px;"><i id="header_tds" class="fa fa-arrow-left" aria-hidden="true" style="color: transparent !important;"></i></td>';
|
||||
}*/
|
||||
$extra = mysqli_query($conx, "SELECT uid FROM notifs WHERE uid='$u_uid' && viewed='no' ORDER BY id");
|
||||
$ncount = mysqli_num_rows($extra);
|
||||
if($ncount > 0) {
|
||||
$alert_bell_color = "#ffff99";
|
||||
}
|
||||
if($ncount <= 0) {
|
||||
$ncount = "";
|
||||
}
|
||||
echo "<td id=\"alertbell_r\" onclick=\"window.location='/alerts';\" style=\"padding-left: 15px;\"><i id=\"header_tds\" style=\"color: $alert_bell_color !important;\" class=\"fa fa-bell\" aria-hidden=\"true\"></i></td>";
|
||||
echo "
|
||||
<td style=\"width: 100%;\" onclick=\"window.location='/hub';\"><img class=\"mdv5_header\" src=\"/img/header.png\" alt=\"\" style=\"width: 40%; padding-top: 5px;\"></td>
|
||||
<td style=\"padding-right: 15px;\" onclick=\"var log_conf=confirm('Are you sure you really want to logout? \nWhy not stay logged in? \nFine, go ahead. \nLogout?');if(log_conf == true){window.location='/logout?t=$u_token';}\"><i id=\"header_tds\" class=\"fa fa-sign-out\" aria-hidden=\"true\"></i></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
";
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
if($linebreak == true) {
|
||||
echo "<br>";
|
||||
}
|
||||
if($logged_in == true) {
|
||||
if($alerts == true) {
|
||||
if($this_page != 'alerts' && $this_page != 'home') {
|
||||
//echo "<div id=\"ld_alerts\">";
|
||||
//include_once("../inc/alerts.php");
|
||||
//echo "</div>";
|
||||
//echo "<script>setInterval('upAlerts()', 10000);</script>";
|
||||
}
|
||||
}
|
||||
if($this_page != 'chat' && $this_page != 'mail') {
|
||||
echo "<script>function expand(id) {
|
||||
var e = document.getElementById(id);
|
||||
if(e.style.display == 'block')
|
||||
e.style.display = 'none';
|
||||
else
|
||||
e.style.display = 'block';
|
||||
}</script>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
<script src="https://misdew.com/inc/jquery.min.js"></script>
|
||||
<script>
|
||||
function showSpoiler(obj) {
|
||||
var spoiler_hidden = obj.parentNode.getElementsByTagName("div")[0];
|
||||
if(spoiler_hidden.style.display == "none") {
|
||||
spoiler_hidden.style.display = "";
|
||||
obj.innerHTML = "<i class=\"fa fa-eye-slash\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
else {
|
||||
spoiler_hidden.style.display = "none";
|
||||
obj.innerHTML = "<i class=\"fa fa-eye\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
}
|
||||
function upAlertBell() {
|
||||
$.get("/inc/alertbell.php", function(d) {
|
||||
$("#alertbell").html(d);
|
||||
$("#alertbell_r").html(d);
|
||||
});
|
||||
}
|
||||
setInterval('upAlertBell()', 5000);
|
||||
</script>
|
||||
|
|
@ -1 +1,3 @@
|
|||
|
||||
<?php
|
||||
header("location: /");
|
||||
?>
|
||||
|
|
|
|||
4
inc/jquery.min.js
vendored
Normal file
4
inc/jquery.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
7
inc/load_alerts.php
Normal file
7
inc/load_alerts.php
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<?php
|
||||
require_once("../inc/conx.php");
|
||||
echo "<div id=\"ld_alerts\">";
|
||||
include_once("../inc/alerts.php");
|
||||
echo "</div>";
|
||||
echo "<script>setInterval('upAlerts()', 20000);</script>";
|
||||
?>
|
||||
229
inc/replace.php
Normal file
229
inc/replace.php
Normal file
|
|
@ -0,0 +1,229 @@
|
|||
<?php
|
||||
// ******************************************** //
|
||||
// ********* SET PROPERTIES OF EMOJIS ********* //
|
||||
// ******************************************** //
|
||||
$emoji_width = "20px";
|
||||
$emoji_height = "20px";
|
||||
$emoji_type = $u_emoji_type;
|
||||
// ******************************************** //
|
||||
// *************** EMOJI FACES *************** //
|
||||
// ******************************************** //
|
||||
$string = str_replace(":pepe:","<img src=\"/img/stickers/pepe.png\" alt=\":pepe:\" style=\"width: auto; height: 80px;\">",$string);
|
||||
|
||||
|
||||
$string = str_replace(":kane:","<img src=\"/img/stickers/kane.gif\" alt=\":kane:\" style=\"width: auto; height: 80px;\">",$string);
|
||||
|
||||
|
||||
|
||||
$string = str_replace(":pepe-punch:","<img src=\"/img/stickers/pepe-punch.png\" alt=\":pepe-punch:\" style=\"width: auto; height: 80px;\">",$string);
|
||||
$string = str_replace(":pepe-gun1:","<img src=\"/img/stickers/pepe-gun1.png\" alt=\":pepe-gun1:\" style=\"width: auto; height: 80px;\">",$string);
|
||||
$string = str_replace(":pepe-mk:","<img src=\"/img/stickers/pepe-mk.png\" alt=\":pepe-mk:\" style=\"width: auto; height: 80px;\">",$string);
|
||||
$string = str_replace(":pepe-sad1:","<img src=\"/img/stickers/pepe-sad1.png\" alt=\":pepe-sad1:\" style=\"width: auto; height: 80px;\">",$string);
|
||||
$string = str_replace(":pepe-weetawd:","<img src=\"/img/stickers/pepe-weetawd.png\" alt=\":pepe-weetawd:\" style=\"width: auto; height: 80px;\">",$string);
|
||||
$string = str_replace(":pepe-HAHA:","<img src=\"/img/stickers/pepe-HAHA.png\" alt=\":pepe-HAHA:\" style=\"width: auto; height: 80px;\">",$string);
|
||||
$string = str_replace(":pepe-eyes:","<img src=\"/img/stickers/pepe-eyes.png\" alt=\":pepe-eyes:\" style=\"width: auto; height: 80px;\">",$string);
|
||||
$string = str_replace(":pepe-k:","<img src=\"/img/stickers/pepe-k.png\" alt=\":pepe-k:\" style=\"width: auto; height: 80px;\">",$string);
|
||||
$string = str_replace(":wojak:","<img src=\"/img/stickers/wojak.png\" alt=\":wojak:\" style=\"width: auto; height: 80px;\">",$string);
|
||||
$string = str_replace(":withered:","<img src=\"/img/stickers/withered.png\" alt=\":pepe-HAHA:\" style=\"width: auto; height: 80px;\">",$string);
|
||||
$string = str_replace(":lock:","<img src=\"/img/stickers/lock.png\" alt=\":pepe-HAHA:\" style=\"width: auto; height: 80px;\">",$string);
|
||||
$string = str_replace(":pepe-grog:","<img src=\"/img/stickers/pepe-grog.png\" alt=\":pepe-grog:\" style=\"width: auto; height: 80px;\">",$string);
|
||||
$string = str_replace(":roblock:","<img src=\"/img/stickers/roblock.png\" alt=\":roblock:\" style=\"width: auto; height: 80px;\">",$string);
|
||||
|
||||
|
||||
|
||||
$string = str_replace(":easter-pepe:","<img src=\"/img/stickers/easter-pepe.png\" alt=\":easter-pepe:\" style=\"width: auto; height: 100px;\">",$string);
|
||||
$string = str_replace(":cow-gif:","<img src=\"/img/stickers/yak.gif\" alt=\":cow-gif:\" style=\"width: auto; height: 80px;\">",$string);
|
||||
$string = str_replace(":easter-gif:","<img src=\"/img/stickers/easter-gif.gif\" alt=\":easter-gif:\" style=\"width: auto; height: 90px;\">",$string);
|
||||
|
||||
$string = str_replace(":ricardo:","<img src=\"/img/stickers/ricardo.png\" alt=\":ricardo:\" style=\"width: auto; height: 80px;\">",$string);
|
||||
$string = str_replace(":ricardo-smile:","<img src=\"/img/stickers/ricardo-smile.png\" alt=\":ricardo-smile:\" style=\"width: auto; height: 80px;\">",$string);
|
||||
// *** infinity sign *** //
|
||||
$string = str_replace("∞","∞",$string);
|
||||
$string = str_replace("RB:","<img src=\"/img/stickers/epic-rainbow.png\" alt=\"RB:\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace(":ponything:","<img src=\"/img/stickers/pony-thing.png\" alt=\":ponything:\" style=\"width: $emoji_width; height: auto;\">",$string);
|
||||
// *** Smiley *** //
|
||||
//$string = str_replace(":)","<img src=\"/img/emojis/$emoji_type/smile.png\" alt=\":)\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace(":smile:","<img src=\"/img/emojis/$emoji_type/smile.png\" alt=\":)\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace("☺","<img src=\"/img/emojis/$emoji_type/smile.png\" alt=\":)\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace("🙂","<img src=\"/img/emojis/$emoji_type/smile.png\" alt=\":)\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
// *** Tear *** //
|
||||
//$string = str_replace(":'(","<img src=\"/img/emojis/$emoji_type/tear.png\" alt=\":'(\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
//$string = str_replace(";(","<img src=\"/img/emojis/$emoji_type/tear.png\" alt=\":'(\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace(":tear:","<img src=\"/img/emojis/$emoji_type/tear.png\" alt=\":'(\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace("😢","<img src=\"/img/emojis/$emoji_type/tear.png\" alt=\":'(\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
// *** Drool *** //
|
||||
$string = str_replace(":€","<img src=\"/img/emojis/$emoji_type/drool.png\" alt=\":€\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace(":drool:","<img src=\"/img/emojis/$emoji_type/drool.png\" alt=\":€\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace("🤤","<img src=\"/img/emojis/$emoji_type/drool.png\" alt=\":€\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
// *** Angry (red) *** //
|
||||
$string = str_replace("]:[","<img src=\"/img/emojis/$emoji_type/angry_red.png\" alt=\"]:[\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace(":angry_red:","<img src=\"/img/emojis/$emoji_type/angry_red.png\" alt=\"]:[\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace("😡","<img src=\"/img/emojis/$emoji_type/angry_red.png\" alt=\"]:[\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
// *** Smirk *** //
|
||||
//$string = str_replace(";/","<img src=\"/img/emojis/$emoji_type/smirk.png\" alt=\";/\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace(":smirk:","<img src=\"/img/emojis/$emoji_type/smirk.png\" alt=\";/\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace("😏","<img src=\"/img/emojis/$emoji_type/smirk.png\" alt=\";/\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
// *** Unamused *** //
|
||||
//$string = str_replace("-_-","<img src=\"/img/emojis/$emoji_type/unamused.png\" alt=\"-_-\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace(":unamused:","<img src=\"/img/emojis/$emoji_type/unamused.png\" alt=\"-_-\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace("😑","<img src=\"/img/emojis/$emoji_type/unamused.png\" alt=\"-_-\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
// *** Heart-Eyes *** //
|
||||
//$string = str_replace("&)","<img src=\"/img/emojis/$emoji_type/heart-eyes.png\" alt=\"&)\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace(":heart-eyes:","<img src=\"/img/emojis/$emoji_type/heart-eyes.png\" alt=\"&)\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace("😍","<img src=\"/img/emojis/$emoji_type/heart-eyes.png\" alt=\"&)\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
// *** Halo *** //
|
||||
//$string = str_replace("[]:]","<img src=\"/img/emojis/$emoji_type/halo.png\" alt=\"[]:]\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace(":halo:","<img src=\"/img/emojis/$emoji_type/halo.png\" alt=\"[]:]\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace("😇","<img src=\"/img/emojis/$emoji_type/halo.png\" alt=\"[]:]\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
// *** No-Face *** //
|
||||
//$string = str_replace(":1","<img src=\"/img/emojis/$emoji_type/no-face.png\" alt=\":1\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace(":no-face:","<img src=\"/img/emojis/$emoji_type/no-face.png\" alt=\":1\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace("😶","<img src=\"/img/emojis/$emoji_type/no-face.png\" alt=\":1\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
// *** Sunglasses *** //
|
||||
$string = str_replace("B)","<img src=\"/img/emojis/$emoji_type/sunglasses.png\" alt=\"B)\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
//$string = str_replace("8)","<img src=\"/img/emojis/$emoji_type/sunglasses.png\" alt=\"B)\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace(":sunglasses:","<img src=\"/img/emojis/$emoji_type/sunglasses.png\" alt=\"B)\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace("😎","<img src=\"/img/emojis/$emoji_type/sunglasses.png\" alt=\"B)\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
// *** Exhausted *** //
|
||||
//$string = str_replace("D:'","<img src=\"/img/emojis/$emoji_type/exhausted.png\" alt=\"D:'\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace(":exhausted:","<img src=\"/img/emojis/$emoji_type/exhausted.png\" alt=\"D:'\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace("😫","<img src=\"/img/emojis/$emoji_type/exhausted.png\" alt=\"D:'\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
// *** Sleep *** //
|
||||
//$string = str_replace(":z","<img src=\"/img/emojis/$emoji_type/sleep.png\" alt=\":z\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace(":sleep:","<img src=\"/img/emojis/$emoji_type/sleep.png\" alt=\":z\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace("😴","<img src=\"/img/emojis/$emoji_type/sleep.png\" alt=\":z\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
// *** Sad *** //
|
||||
//$string = str_replace(":(","<img src=\"/img/emojis/$emoji_type/sad.png\" alt=\":(\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace(":sad:","<img src=\"/img/emojis/$emoji_type/sad.png\" alt=\":(\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace("😞","<img src=\"/img/emojis/$emoji_type/sad.png\" alt=\":(\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
// *** Cry *** //
|
||||
//$string = str_replace(":"(","<img src=\"/img/emojis/$emoji_type/cry.png\" alt=\":"(\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace(":cry:","<img src=\"/img/emojis/$emoji_type/cry.png\" alt=\":"(\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace("😭","<img src=\"/img/emojis/$emoji_type/cry.png\" alt=\":"(\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
// *** Sick *** //
|
||||
//$string = str_replace(":[]","<img src=\"/img/emojis/$emoji_type/sick.png\" alt=\":[]\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace(":sick:","<img src=\"/img/emojis/$emoji_type/sick.png\" alt=\":[]\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace("😷","<img src=\"/img/emojis/$emoji_type/sick.png\" alt=\":[]\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
// *** Dizzy *** //
|
||||
//$string = str_replace("xO","<img src=\"/img/emojis/$emoji_type/dizzy.png\" alt=\"xO\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace(":dizzy:","<img src=\"/img/emojis/$emoji_type/dizzy.png\" alt=\"xO\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace("😵","<img src=\"/img/emojis/$emoji_type/dizzy.png\" alt=\"xO\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
// *** Fearful *** //
|
||||
//$string = str_replace("D'8","<img src=\"/img/emojis/$emoji_type/fearful.png\" alt=\"D'8\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace(":fearful:","<img src=\"/img/emojis/$emoji_type/fearful.png\" alt=\"D'8\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace("😨","<img src=\"/img/emojis/$emoji_type/fearful.png\" alt=\"D'8\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
// *** Scream *** //
|
||||
$string = str_replace(":scream:","<img src=\"/img/emojis/$emoji_type/scream.png\" alt=\"=O\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace("😱","<img src=\"/img/emojis/$emoji_type/scream.png\" alt=\"=O\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
// *** Crazy *** //
|
||||
//$string = str_replace(";p","<img src=\"/img/emojis/$emoji_type/crazy.png\" alt=\";p\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace(":crazy:","<img src=\"/img/emojis/$emoji_type/crazy.png\" alt=\";p\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace("😜","<img src=\"/img/emojis/$emoji_type/crazy.png\" alt=\";p\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
// *** Surprised *** //
|
||||
$string = str_replace(":surprised:","<img src=\"/img/emojis/$emoji_type/surprised.png\" alt=\":o\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace("😮","<img src=\"/img/emojis/$emoji_type/surprised.png\" alt=\":o\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
// *** Kiss *** //
|
||||
//$string = str_replace(";*","<img src=\"/img/emojis/$emoji_type/kiss.png\" alt=\";*\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace(":kiss:","<img src=\"/img/emojis/$emoji_type/kiss.png\" alt=\";*\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace("😘","<img src=\"/img/emojis/$emoji_type/kiss.png\" alt=\";*\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
// *** Hushed *** //
|
||||
//$string = str_replace(":#","<img src=\"/img/emojis/$emoji_type/hushed.png\" alt=\":#\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace(":hushed:","<img src=\"/img/emojis/$emoji_type/hushed.png\" alt=\":#\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace("😯","<img src=\"/img/emojis/$emoji_type/hushed.png\" alt=\":#\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
// *** Laughing *** //
|
||||
//$string = str_replace("XD","<img src=\"/img/emojis/$emoji_type/laughing.png\" alt=\"XD\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace(":laughing:","<img src=\"/img/emojis/$emoji_type/laughing.png\" alt=\"XD\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace("😆","<img src=\"/img/emojis/$emoji_type/laughing.png\" alt=\"XD\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
// *** Laughing (tears) *** //
|
||||
//$string = str_replace("X"D","<img src=\"/img/emojis/$emoji_type/laughing_tears.png\" alt=\"X"D\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace(":laughing_tears:","<img src=\"/img/emojis/$emoji_type/laughing_tears.png\" alt=\"X"D\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace("😂","<img src=\"/img/emojis/$emoji_type/laughing_tears.png\" alt=\"X"D\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
// *** Kissy *** //
|
||||
//$string = str_replace(":*","<img src=\"/img/emojis/$emoji_type/kissy.png\" alt=\":*\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace(":kissy:","<img src=\"/img/emojis/$emoji_type/kissy.png\" alt=\":*\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace("😗","<img src=\"/img/emojis/$emoji_type/kissy.png\" alt=\":*\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
// *** Monkey (eyes) *** //
|
||||
//$string = str_replace("$" . "O","<img src=\"/img/emojis/$emoji_type/monkey_eyes.png\" alt=\"$O\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace(":monkey_eyes:","<img src=\"/img/emojis/$emoji_type/monkey_eyes.png\" alt=\"$O\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace("🙈","<img src=\"/img/emojis/$emoji_type/monkey_eyes.png\" alt=\"$O\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
// *** Monkey (ears) *** //
|
||||
//$string = str_replace("||O","<img src=\"/img/emojis/$emoji_type/monkey_ears.png\" alt=\"||O\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace(":monkey_ears:","<img src=\"/img/emojis/$emoji_type/monkey_ears.png\" alt=\"||O\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace("🙉","<img src=\"/img/emojis/$emoji_type/monkey_ears.png\" alt=\"||O\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
// *** Monkey (mouth) *** //
|
||||
//$string = str_replace(":@","<img src=\"/img/emojis/$emoji_type/monkey_mouth.png\" alt=\":@\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace(":monkey_mouth:","<img src=\"/img/emojis/$emoji_type/monkey_mouth.png\" alt=\":@\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace("🙊","<img src=\"/img/emojis/$emoji_type/monkey_mouth.png\" alt=\":@\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
// *** Alien *** //
|
||||
//$string = str_replace("°v°","<img src=\"/img/emojis/$emoji_type/alien.png\" alt=\"°v°\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace(":alien:","<img src=\"/img/emojis/$emoji_type/alien.png\" alt=\"°v°\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace("👽","<img src=\"/img/emojis/$emoji_type/alien.png\" alt=\"°v°\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
// *** Ghost *** //
|
||||
//$string = str_replace("(^O^)","<img src=\"/img/emojis/$emoji_type/ghost.png\" alt=\"(^O^)\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace(":ghost:","<img src=\"/img/emojis/$emoji_type/ghost.png\" alt=\"(^O^)\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace("👻","<img src=\"/img/emojis/$emoji_type/ghost.png\" alt=\"(^O^)\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
// *** Wink *** //
|
||||
//$string = str_replace(";)","<img src=\"/img/emojis/$emoji_type/wink.png\" alt=\";)\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace(":wink:","<img src=\"/img/emojis/$emoji_type/wink.png\" alt=\";)\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace("😉","<img src=\"/img/emojis/$emoji_type/wink.png\" alt=\";)\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
// *** Poo *** //
|
||||
//$string = str_replace("/Õ\\","<img src=\"/img/emojis/$emoji_type/poo.png\" alt=\"/Õ\\\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace(":poo:","<img src=\"/img/emojis/$emoji_type/poo.png\" alt=\"/Õ\\\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace("💩","<img src=\"/img/emojis/$emoji_type/poo.png\" alt=\"/Õ\\\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
// *** Nerd *** //
|
||||
//$string = str_replace("8}","<img src=\"/img/emojis/$emoji_type/nerd.png\" alt=\"8}\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace(":nerd:","<img src=\"/img/emojis/$emoji_type/nerd.png\" alt=\"8}\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace("🤓","<img src=\"/img/emojis/$emoji_type/nerd.png\" alt=\"8}\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
// *** Dissatisfied *** //
|
||||
$string = str_replace(":dissatisfied:","<img src=\"/img/emojis/$emoji_type/dissatisfied.png\" alt=\":dissatisfied:\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace("😒","<img src=\"/img/emojis/$emoji_type/dissatisfied.png\" alt=\":dissatisfied:\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
// *** Thinker *** //
|
||||
$string = str_replace(":thinker:","<img src=\"/img/emojis/$emoji_type/thinker.png\" alt=\":thinker:\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace("🤔","<img src=\"/img/emojis/$emoji_type/thinker.png\" alt=\":thinker:\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
// *** Silly *** //
|
||||
$string = str_replace(":silly:","<img src=\"/img/emojis/$emoji_type/silly.png\" alt=\":silly:\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace("🙃","<img src=\"/img/emojis/$emoji_type/silly.png\" alt=\":silly:\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
// *** Awkward *** //
|
||||
$string = str_replace(":awkward:","<img src=\"/img/emojis/$emoji_type/awkward.png\" alt=\":awkward:\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace("😬","<img src=\"/img/emojis/$emoji_type/awkward.png\" alt=\":awkward:\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
// *** Injured *** //
|
||||
$string = str_replace(":injured:","<img src=\"/img/emojis/$emoji_type/injured.png\" alt=\":injured:\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace("🤕","<img src=\"/img/emojis/$emoji_type/injured.png\" alt=\":injured:\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
// *** Vomit *** //
|
||||
$string = str_replace(":vomit:","<img src=\"/img/emojis/$emoji_type/vomit.png\" alt=\":vomit:\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace("🤢","<img src=\"/img/emojis/$emoji_type/vomit.png\" alt=\":vomit:\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
// ******************************************** //
|
||||
// *************** EMOJI GESTURE ************** //
|
||||
// ******************************************** //
|
||||
// *** Peace *** //
|
||||
//$string = str_replace("-Y-","<img src=\"/img/emojis/$emoji_type/peace.png\" alt=\"-Y-\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace(":peace:","<img src=\"/img/emojis/$emoji_type/peace.png\" alt=\"-Y-\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace("✌","<img src=\"/img/emojis/$emoji_type/peace.png\" alt=\"-Y-\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace("✌️","<img src=\"/img/emojis/$emoji_type/peace.png\" alt=\"-Y-\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
// ******************************************** //
|
||||
// *************** EMOJI ANIMALS ************** //
|
||||
// ******************************************** //
|
||||
// *** Cat *** //
|
||||
//$string = str_replace("^-^","<img src=\"/img/emojis/$emoji_type/cat.png\" alt=\"^-^\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace(":cat:","<img src=\"/img/emojis/$emoji_type/cat.png\" alt=\"^-^\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace("🐈","<img src=\"/img/emojis/$emoji_type/cat.png\" alt=\"^-^\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
// *** Snake *** //
|
||||
//$string = str_replace("(S)","<img src=\"/img/emojis/$emoji_type/snake.png\" alt=\"(S)\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace(":snake:","<img src=\"/img/emojis/$emoji_type/snake.png\" alt=\"(S)\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace("🐍","<img src=\"/img/emojis/$emoji_type/snake.png\" alt=\"(S)\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
// ******************************************** //
|
||||
// *************** EMOJI SYMBOLS ************** //
|
||||
// ******************************************** //
|
||||
// *** Boi *** //
|
||||
$string = str_replace(":boi:","<img src=\"/img/emojis/$emoji_type/boi.png\" alt=\":boi:\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace("👋","<img src=\"/img/emojis/$emoji_type/boi.png\" alt=\":boi:\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
// *** Heart (red) *** //
|
||||
$string = str_replace("<3","<img src=\"/img/emojis/$emoji_type/heart_red.png\" alt=\"<3\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace(":heart_red:","<img src=\"/img/emojis/$emoji_type/heart_red.png\" alt=\"<3\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace("♥","<img src=\"/img/emojis/$emoji_type/heart_red.png\" alt=\"<3\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace("❤️","<img src=\"/img/emojis/$emoji_type/heart_red.png\" alt=\"<3\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
// *** Knife *** //
|
||||
//$string = str_replace("(7)","<img src=\"/img/emojis/$emoji_type/knife.png\" alt=\"(7)\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace(":knife:","<img src=\"/img/emojis/$emoji_type/knife.png\" alt=\"(7)\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
$string = str_replace("🔪","<img src=\"/img/emojis/$emoji_type/knife.png\" alt=\"(7)\" style=\"width: $emoji_width; height: $emoji_width;\">",$string);
|
||||
?>
|
||||
27
inc/toggle.php
Normal file
27
inc/toggle.php
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
require_once("../inc/conx.php");
|
||||
$gtoken = safe($_GET['t']);
|
||||
$gid = safe($_GET['i']);
|
||||
if($gtoken == $u_token && $logged_in == true && $gid) {
|
||||
$ver = mysqli_query($conx, "SELECT uid,app_uqid FROM notifs WHERE id='$gid'");
|
||||
$s = mysqli_fetch_assoc($ver);
|
||||
$notif_uid = $s['uid'];
|
||||
$napp_uqid = $s['app_uqid'];
|
||||
if($notif_uid == $u_uid) {
|
||||
$toggleit = mysqli_num_rows(mysqli_query($conx, "SELECT id FROM user_apps WHERE snooze='yes' && uid='$u_uid' && app_uqid='$napp_uqid'"));
|
||||
if($toggleit == 1) {
|
||||
mysqli_query($conx, "UPDATE user_apps SET snooze='no' WHERE uid='$u_uid' && app_uqid='$napp_uqid'");
|
||||
echo "snooze";
|
||||
}
|
||||
elseif($toggleit == 0) {
|
||||
mysqli_query($conx, "UPDATE user_apps SET snooze='yes' WHERE uid='$u_uid' && app_uqid='$napp_uqid'");
|
||||
echo "wake";
|
||||
}
|
||||
exit();
|
||||
}
|
||||
exit();
|
||||
}
|
||||
else {
|
||||
exit();
|
||||
}
|
||||
?>
|
||||
24
inc/view.php
Normal file
24
inc/view.php
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
require_once("../inc/conx.php");
|
||||
$gtoken = safe($_GET['t']);
|
||||
$gid = safe($_GET['i']);
|
||||
if($gtoken == $u_token && $logged_in == true && $gid) {
|
||||
$ver = mysqli_query($conx, "SELECT uid,app_uqid,view_link,viewed FROM notifs WHERE id='$gid'");
|
||||
$s = mysqli_fetch_assoc($ver);
|
||||
$notif_uid = $s['uid'];
|
||||
$napp_uqid = $s['app_uqid'];
|
||||
$napp_href = $s['view_link'];
|
||||
$napp_viewed = $s['viewed'];
|
||||
if($notif_uid == $u_uid) {
|
||||
if($napp_viewed == 'no') {
|
||||
mysqli_query($conx, "UPDATE notifs SET viewed='yes' WHERE id='$gid'");
|
||||
}
|
||||
header("location: $napp_href");
|
||||
exit();
|
||||
}
|
||||
exit();
|
||||
}
|
||||
else {
|
||||
exit();
|
||||
}
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue