init
This commit is contained in:
24
modules/Home/EcmAjaxSearchSettings.php
Executable file
24
modules/Home/EcmAjaxSearchSettings.php
Executable file
@@ -0,0 +1,24 @@
|
||||
<?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);
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user