|
@@ -55,6 +55,10 @@ if (isset($_POST['action']) && $_POST['action'] == "settings"){
|
|
$cookie[$index]['explicit'] = htmlentities($value);
|
|
$cookie[$index]['explicit'] = htmlentities($value);
|
|
break;
|
|
break;
|
|
|
|
|
|
|
|
+ case "unrollcw":
|
|
|
|
+ $cookie[$index]['unrollcw'] = htmlentities($value);
|
|
|
|
+ break;
|
|
|
|
+
|
|
case "emoji":
|
|
case "emoji":
|
|
$cookie[$index]['emoji'] = intval($value);
|
|
$cookie[$index]['emoji'] = intval($value);
|
|
break;
|
|
break;
|
|
@@ -76,10 +80,18 @@ if (isset($_POST['action']) && $_POST['action'] == "settings"){
|
|
break;
|
|
break;
|
|
|
|
|
|
|
|
|
|
- case "reblog":
|
|
|
|
- $cookie[$index]['reblog'] = ($value == "on" ? "on" : "off");
|
|
|
|
|
|
+ case "theme":
|
|
|
|
+ $cookie[$index]['theme'] = sanitize($value);
|
|
break;
|
|
break;
|
|
|
|
|
|
|
|
+ case "notif":
|
|
|
|
+ $cookie[$index]['notif'] = "";
|
|
|
|
+ $cookie[$index]['notif'] .= (isset($value['fav']) ? "1" : "0");
|
|
|
|
+ $cookie[$index]['notif'] .= (isset($value['rt']) ? "1" : "0");
|
|
|
|
+ $cookie[$index]['notif'] .= (isset($value['mnt']) ? "1" : "0");
|
|
|
|
+ $cookie[$index]['notif'] .= (isset($value['follow']) ? "1" : "0");
|
|
|
|
+ break;
|
|
|
|
+
|
|
case "videoloop":
|
|
case "videoloop":
|
|
$cookie[$index]['videoloop'] = ($value == "on" ? "on" : "off");
|
|
$cookie[$index]['videoloop'] = ($value == "on" ? "on" : "off");
|
|
break;
|
|
break;
|
|
@@ -136,6 +148,10 @@ if (isset($_POST['action']) && $_POST['action'] == "settings"){
|
|
|
|
|
|
case "bw":
|
|
case "bw":
|
|
$theme['bw'] = sanitize($value);
|
|
$theme['bw'] = sanitize($value);
|
|
|
|
+ break;
|
|
|
|
+
|
|
|
|
+ case "dr":
|
|
|
|
+ $theme['dr'] = sanitize($value);
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -272,10 +288,12 @@ foreach($_GET as $key => $value){
|
|
if(in_array($value,$user_settings['nsfw'])){
|
|
if(in_array($value,$user_settings['nsfw'])){
|
|
$key = array_search($value, $user_settings['nsfw']);
|
|
$key = array_search($value, $user_settings['nsfw']);
|
|
unset($user_settings['nsfw'][$key]);
|
|
unset($user_settings['nsfw'][$key]);
|
|
- setrawcookie("user_settings",base64_encode(json_encode($user_settings)),time()+60*60*24*30,'/');
|
|
|
|
|
|
+ $cookie[$index]['nsfw'] = $user_settings['nsfw'];
|
|
|
|
+ setrawcookie("user_settings", base64_encode(json_encode($cookie)) , time() + 60 * 60 * 24 * 30, '/');
|
|
} else {
|
|
} else {
|
|
$user_settings['nsfw'][] = htmlentities($value);
|
|
$user_settings['nsfw'][] = htmlentities($value);
|
|
- setrawcookie("user_settings",base64_encode(json_encode($user_settings)),time()+60*60*24*30,'/');
|
|
|
|
|
|
+ $cookie[$index]['nsfw'] = $user_settings['nsfw'];
|
|
|
|
+ setrawcookie("user_settings", base64_encode(json_encode($cookie)) , time() + 60 * 60 * 24 * 30, '/');
|
|
}
|
|
}
|
|
echo "1";
|
|
echo "1";
|
|
die();
|
|
die();
|
|
@@ -288,10 +306,12 @@ foreach($_GET as $key => $value){
|
|
if(in_array($value,$user_settings['hide'])){
|
|
if(in_array($value,$user_settings['hide'])){
|
|
$key = array_search($value, $user_settings['hide']);
|
|
$key = array_search($value, $user_settings['hide']);
|
|
unset($user_settings['hide'][$key]);
|
|
unset($user_settings['hide'][$key]);
|
|
- setrawcookie("user_settings",base64_encode(json_encode($user_settings)),time()+60*60*24*30,'/');
|
|
|
|
|
|
+ $cookie[$index]['hide'] = $user_settings['hide'];
|
|
|
|
+ setrawcookie("user_settings", base64_encode(json_encode($cookie)) , time() + 60 * 60 * 24 * 30, '/');
|
|
} else {
|
|
} else {
|
|
$user_settings['hide'][] = htmlentities($value);
|
|
$user_settings['hide'][] = htmlentities($value);
|
|
- setrawcookie("user_settings",base64_encode(json_encode($user_settings)),time()+60*60*24*30,'/');
|
|
|
|
|
|
+ $cookie[$index]['hide'] = $user_settings['hide'];
|
|
|
|
+ setrawcookie("user_settings", base64_encode(json_encode($cookie)) , time() + 60 * 60 * 24 * 30, '/');
|
|
}
|
|
}
|
|
echo "1";
|
|
echo "1";
|
|
die();
|
|
die();
|