<?php
 
/**
 
*
 
*  Author : Sunish Kumar M.V
 
*
 
*  This is licenced under LGPL licence.
 
* 
 
**/
 
 
require_once("rspaconf.inc.php");
 
 
    $className = $_REQUEST['__class'];
 
    $methordName =  $_REQUEST['__methord'];
 
 
    // Wenn Pfad übermittelt wurde
 
        if (!empty($_REQUEST['__pfad'])){$X_Pfad = base64_decode($_REQUEST['__pfad']);}else{$X_Pfad = $RSPA['class_folder'];}
 
        if ($_REQUEST['__include_file']){$_REQUEST['__include_file'] = base64_decode($_REQUEST['__include_file']);}
 
 
 include ("../components/Form.class.php");
 
 
 $filename = $X_Pfad.$className.$RSPA['class_extension'];
 
 
 
 require_once($filename);
 
 
 
 
if ( class_exists($className) ){
 
    eval ('$t = new ' . $className . '();');
 
    $t->initialize();
 
 
    // Eventuelle Parameter berücksichtigen
 
       $parameter = "";
 
       if(!empty($_REQUEST['__parameters'])){
 
          $arg =  $_REQUEST['__parameters'];
 
              $indx = count($arg);
 
             $ar1 = array_fill($indx, 9, '');
 
             $arg = array_merge($arg,$ar1);
 
             
 
          foreach ($arg as $id => $value){
 
             if ($value){
 
                if ($parameter){$parameter .= "','" . $value;}else{$parameter .= $value;}
 
             }
 
             }
 
         }
 
 
         eval ('$t->' . $methordName . '(\'' . $parameter . '\');');
 
 
 
    if( (( isset($_REQUEST['__autocomplete']))?$_REQUEST['__autocomplete']:"") == "yes"){
 
        print($t->getAutoCompleteChoice());
 
        
 
    }
 
    else {
 
        header('Content-type: text/xml');
 
        print($t->getXml());
 
    }
 
 }
 
 //print "..." . $_REQUEST['__methord'] . "::::";
 
 /*
 
 if ( class_exists($_REQUEST['__class']) ){
 
    eval ("$t = new " . $_REQUEST['__class'] . "();");
 
    eval ("$t->initialize();");
 
    eval ("$t->" . $_REQUEST['__methord'] . "();");
 
    
 
    header('Content-type: text/xml');
 
    print($t->getXml());
 
 }else{
 
    print "Klasse bzw. Methode existiert nicht.";
 
 }
 
   */
 
 /*
 
 
 
 $class = new ReflectionClass($className);
 
 $inst = $class->newInstance();
 
 $method = new ReflectionMethod($className, "initialize");
 
 $method->invoke($inst);
 
 
 
 // $inst->initialize();
 
 
 
 
 $method = new ReflectionMethod($className, $methordName);
 
 
 if(! empty($_REQUEST['__parameters'])){
 
     
 
     if(method_exists($inst,"invokeArgs")){
 
         $arg =  $_REQUEST['__parameters'];
 
         $method->invokeArgs($inst,$arg);
 
     }
 
     else{
 
         //Invokes for max 10 parameters 
 
         
 
         $arg =  $_REQUEST['__parameters'];
 
         
 
         $indx = count($arg);
 
         $ar1 = array_fill($indx, 9, '');
 
         $arg = array_merge($arg,$ar1);
 
         $method->invoke($inst,$arg[0],$arg[1],$arg[2],$arg[3],$arg[4],$arg[5],$arg[6],$arg[7],$arg[8],$arg[9]);
 
     }
 
 }
 
 else {
 
     $method->invoke($inst);
 
 }
 
 
 
 if( (( isset($_REQUEST['__autocomplete']))?$_REQUEST['__autocomplete']:"") == "yes"){
 
     print($inst->getAutoCompleteChoice());
 
     
 
 }
 
 else{
 
     header('Content-type: text/xml');
 
     print($inst->getXml());
 
 }
 
 */
 
?>
 
 
 |