32 lines
718 B
PHP
32 lines
718 B
PHP
<?php
|
|
|
|
if(empty($meta) || ( $meta != 'voc:add' && $meta != 'voc:select'&& $meta != 'index'&& $meta != 'lang') ) {
|
|
die();
|
|
}
|
|
|
|
|
|
$sql = "SELECT `settings` FROM `VokabelBox2Users` WHERE `userid` = '$userid'";
|
|
$result_articles = mysql_query ($sql, $ezine_db);
|
|
while ($articleDb = mysql_fetch_object($result_articles))
|
|
{
|
|
$settings = json_decode($articleDb->settings, true);
|
|
}
|
|
|
|
if (strpos($settings[1]['closed-tooltips'], $meta)) {
|
|
die();
|
|
}
|
|
|
|
$settings[1]['closed-tooltips'] = $settings[1]['closed-tooltips'] . "," . $meta;
|
|
|
|
$settings_new = json_encode($settings);
|
|
|
|
|
|
mysql_query("UPDATE `VokabelBox2Users` SET `settings` = '$settings_new' WHERE `userid` = '$userid'");
|
|
|
|
|
|
|
|
print("true");
|
|
|
|
|
|
?>
|