Exemplo n.º 1
0
        break;
    case 'Update':
        eval('$instance = new ' . $objectName . '();');
        $instance->Get($objectId);
        $attributeList = array_keys(get_object_vars($instance));
        foreach ($attributeList as $attribute) {
            if ($attribute != "pog_attribute_type" && $attribute != "pog_query") {
                if (isset($instance->pog_attribute_type[$attribute])) {
                    if (isset($_GET[$attribute])) {
                        $instance->{$attribute} = $_GET[$attribute];
                    }
                }
            }
        }
        $instance->Save();
        RefreshTree($anchor, $root);
        break;
}
/**
 * Refreshes the tree after an operation while preserving node statuses
 *
 * @param unknown_type $objectName
 * @param unknown_type $root
 */
function RefreshTree($objectName, $root, $offset = '', $limit = '')
{
    if ($limit == '') {
        $offset = 0;
        $limit = 50;
    }
    $sqlLimit = "{$offset}, {$limit}";
Exemplo n.º 2
0
        }
        RefreshTree($objectName, $root);
        break;
    case 'Update':
        eval('$instance = new ' . $objectName . '();');
        $instance->Get($objectId);
        $attributeList = array_keys(get_object_vars($instance));
        foreach ($attributeList as $attribute) {
            if ($attribute != "pog_attribute_type" && $attribute != "pog_query") {
                if (isset($_GET[$attribute])) {
                    $instance->{$attribute} = $_GET[$attribute];
                }
            }
        }
        $instance->Save();
        RefreshTree($objectName, $root);
        break;
}
/**
 * Refreshes the tree after an operation while preserving node statuses
 *
 * @param unknown_type $objectName
 * @param unknown_type $root
 */
function RefreshTree($objectName, $root)
{
    $js = "new Array(";
    eval('$instance = new ' . $objectName . '();');
    $attributeList = array_keys(get_object_vars($instance));
    $instanceList = $instance->GetList(array(array(strtolower($objectName) . "Id", ">", 0)), strtolower($objectName) . "Id", false);
    $x = 0;