24 lines
640 B
PHP
24 lines
640 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
if($_REQUEST['function'] == "GetSettings") {
|
||
|
|
global $current_user;
|
||
|
|
$p = $current_user->getPreference($_REQUEST['from_module'].'AjaxSearchSettings');
|
||
|
|
if($p) {
|
||
|
|
$json = getJSONobj();
|
||
|
|
echo '['.str_replace('"','\"',$json->encode($p)).']';
|
||
|
|
die();
|
||
|
|
}
|
||
|
|
} else
|
||
|
|
|
||
|
|
if($_REQUEST['function'] == "SaveSettings") {
|
||
|
|
global $current_user;
|
||
|
|
$settings = array(
|
||
|
|
'pos_top' => $_REQUEST['pos_top'],
|
||
|
|
'pos_left' => $_REQUEST['pos_left'],
|
||
|
|
'frozen' => $_REQUEST['frozen']
|
||
|
|
);
|
||
|
|
$current_user->setPreference($_REQUEST['from_module'].'AjaxSearchSettings', $settings, 0, 'global', $current_user);
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
?>
|