function ajax_savecategorytab()
{
if ($this->data['is_ajaxflag']) {
$this->layout = 'ajax';
$tabvalue = $this->data['tabvalue'] ? $this->data['tabvalue'] : 0;
$data['User']['id'] = SES_ID;
$data['User']['active_dashboard_tab'] = $tabvalue;
if ($this->User->save($data)) {
define('ACT_TAB_ID', $tabvalue);
echo '1';
exit;
} else {
echo '0';
exit;
}
} else {
$this->redirect(HTTP_ROOT);
}
}