if (isset($_REQUEST['treeItemPost']['idpica_alloc'])) {
    $aPostTreeItem['idpica_alloc'] = (int) $_REQUEST['treeItemPost']['idpica_alloc'];
}
if (isset($_REQUEST['treeItemPost']['parentid'])) {
    $aPostTreeItem['parentid'] = (int) $_REQUEST['treeItemPost']['parentid'];
}
if (isset($_REQUEST['treeItemPost']['name'])) {
    $sName = stripslashes($_REQUEST['treeItemPost']['name']);
    $sName = $db->escape($sName);
    $aPostTreeItem['name'] = $sName;
}
$_GET['idpica_alloc'] = (int) $_GET['idpica_alloc'];
#end added 24.06.08 timo.trautmann
$oPage = new cPage();
$oPage->setMargin(10);
$oPage->setMessageBox();
$oTree = new pApiContentAllocationTreeView('f7771624-4874-4745-8b7e-21a49a71a447');
// store item
if ($_POST['step'] == 'store') {
    $pNotify = '<div style="width:410px;margin-bottom:20px;">';
    $sMessage = sprintf(i18n("New Category %s successfully stored!", 'content_allocation'), $treeItem['name']);
    $notification->displayNotification("info", $sMessage);
    $pNotify .= '</div>';
    $oTree->storeItem($aPostTreeItem);
}
// rename item
if ($_POST['step'] == 'storeRename') {
    $pNotify = '<div style="width:410px;margin-bottom:20px;">';
    $sMessage = sprintf(i18n("Category %s successfully renamed!", 'content_allocation'), $treeItem['name']);
    $notification->displayNotification("info", $sMessage);
    $pNotify .= '</div>';