Location: PHPKode > projects > Entier Studio > entierstudio/studio/handlers/ctrl.OnlineDataResourceExport.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.OnlineDataResourceExport.php 81 2008-01-17 23:08:21Z yannromefort $
 */
//-------------------------------------------------------------------------
// Safe mode
if (!defined('__ENTIER_FRONT_CONTROLLER__')) die(403);
//
//-------------------------------------------------------------------------
//	View Handler
//
@include_once (COMPONENTS_VIEW . "view.OnlineDataResourceExporter.php");
//
$resourceView = new OnlineDataResourceExporter();
//
//	Mode Handler
//
$viewHTML = "";
$failHTML = "";
$formMark = "";
//
switch ($__mode) {
    case "view":
        //
        $resourceView->set_field_value("OBJELEMPKID", $userRequest->Parameter("pkid"));
        $resourceView->set_field_value("OBJRESOPKID", $userRequest->Parameter("rkid"));
        //
        switch ($__view) {
            case "view":
                //
                $viewMode = ITEMVIEW;
                $viewHTML = "$__ctrl-$__view.$type.html";
                //
                $resourceView->set_field_value("TMPNODENAME", $userRequest->Parameter("name"));
                $resourceView->set_field_value("TMPNODEPATH", $userRequest->Parameter("path"));
                $resourceView->set_field_value("TMPTYPENAME", $userRequest->Parameter("kind"));
                //
                
            break;
            case "pane":
                //
                $viewMode = PANEVIEW;
                $viewHTML = "$__ctrl-$__view.$type.html";
                //
                $resourceView->set_field_value("TMPPROCSTEP", $userRequest->Parameter("step"));
                //
                $resourceView->set_field_value("TMPPREFNAME", $userRequest->Parameter("name"));
                $resourceView->set_field_value("TMPPREFCODE", $userRequest->Parameter("code"));
                $resourceView->set_field_value("TMPPREFINAM", $userRequest->Parameter("inam"));
                $resourceView->set_field_value("USEPREFNAME", ($userRequest->Parameter("namepref") == "on"));
                $resourceView->set_field_value("USEPREFCODE", ($userRequest->Parameter("codepref") == "on"));
                $resourceView->set_field_value("USEPREFINAM", ($userRequest->Parameter("inampref") == "on"));
                //
                $resourceView->set_field_value("TMPNODENAME", $userRequest->Parameter("item"));
                $resourceView->set_field_value("TMPTYPENAME", $userRequest->Parameter("kind"));
                $resourceView->set_field_value("TMPNODEPATH", $userRequest->Parameter("path"));
                //
                
            break;
            case "menu":
                //
                $viewMode = MENUVIEW;
                $viewHTML = "$__ctrl-$__view.html";
                //
                $resourceView->set_field_value("TMPPROCSTEP", $userRequest->Parameter("step"));
                //
                
            break;
            case "frame":
                //
                $viewMode = FRAMEVIEW;
                $viewHTML = "$__ctrl-$__view.html";
                //
                
            break;
        }
        //
        
    break;
    case "tree":
        //
        $viewMode = TREEVIEW;
        $viewHTML = "$__ctrl-$__view.html";
        $formMark = array(
            "table-list",
            "field-list"
        );
        //
        $resourceView->set_field_value("OBJELEMPKID", $userRequest->Parameter("pkid"));
        $resourceView->set_field_value("OBJRESOPKID", $userRequest->Parameter("rkid"));
        //
        
    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