Location: PHPKode > projects > Entier Studio > entierstudio/studio/handlers/ctrl.OnlineDataResourceMapper.php
<?php
/**
 * Entier Studio
 *
 * LICENSE
 *
 *	Copyright 2006 Entier Studio team.
 *
 *	Licensed under the Apache License, Version 2.0 (the "License");
 *	you may not use this file except in compliance with the License.
 *	You may obtain a copy of the License at
 *		http://www.apache.org/licenses/LICENSE-2.0
 *
 *	Unless required by applicable law or agreed to in writing, software
 *	distributed under the License is distributed on an "AS IS" BASIS,
 *	WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *	See the License for the specific language governing permissions and
 *	limitations under the License.
 *
 * @package    entier.studio
 * @copyright  Copyright (c) 2006 Entier Studio team. All rights reserved.
 * @version	   $Id: ctrl.OnlineDataResourceMapper.php 94 2008-02-03 23:35:48Z yannromefort $
 */
//-------------------------------------------------------------------------
// Safe mode
if (!defined('__ENTIER_FRONT_CONTROLLER__')) die(403);
//
//-------------------------------------------------------------------------
//	View Handler
//
@include_once (COMPONENTS_VIEW . "view.OnlineDataResourceMapper.php");
//
$resourceView = new OnlineDataResourceMapper();
//
//	Mode Handler
//
$viewMode = NULLVIEW;
$failMode = NULLVIEW;
$viewHTML = "";
$failHTML = "";
$formMark = "";
//
switch ($__mode) {
    case "view":
        //
        $viewMode = FRAMEVIEW;
        $viewHTML = "$__ctrl-$__view.html";
        //
        $resourceView->set_field_value("OBJRESOPKID", $userRequest->Parameter("pkid"));
        $resourceView->set_field_value("REPOSITPKID", $userRequest->Parameter("root"));
        //
        
    break;
    case "tree":
        //
        $viewMode = TREEVIEW;
        $viewHTML = "$__ctrl-$__view.html";
        $formMark = array(
            "table-list",
            "field-list"
        );
        //
        $resourceView->set_field_value("OBJRESOPKID", $userRequest->Parameter("pkid"));
        $resourceView->set_field_value("REPOSITPKID", $userRequest->Parameter("root"));
        //
        
    break;
}
//
//-------------------------------------------------------------------------
//	Display View
//
if ($resourceView->renderView($database, $template, $viewHTML, $formMark, $viewMode) == false) {
    if ($resourceView->get_error_count() > 0) {
        //
        $viewMode = FAILVIEW;
        $viewHTML = "action.errors.html";
        //
        @include_once (FRAMEWORK_VIEW . "view.ExceptionView.php");
        //
        $exceptionView = new ExceptionView($resourceView->errorSet());
        $exceptionView->renderView($viewHTML, $formMark, $viewMode);
    }
}
//
//-------------------------------------------------------------------------
?>
Return current item: Entier Studio