Esempio n. 1
0
         } else {
            if ($auth_manager->exists($_POST['user_id'])) {
               //delete ims user
               $current_context = $environment->getCurrentContextItem();
               $auth_object->deleteByUserId($_POST['user_id'],$current_context->getAuthDefault());
            }
         }
         $form_view->setItemIsSaved();
         $is_saved = true;
      }
   }

   // upload ims paket
   elseif ( !empty($command) and ( isOption($command, $translator->getMessage('COMMON_UPLOADFILE_BUTTON')) ) ) {
      if ( !empty($_FILES['upload']['tmp_name']) ) {
         $ims = file_get_contents($_FILES['upload']['tmp_name']);
         include_once('classes/cs_connection_soap_ims.php');
         $ims_connect = new cs_connection_soap_ims($environment);
         $session_item = $environment->getSessionItem();
         pr_xml($ims_connect->ims($session->getSessionID(),$ims));
      }
   }
   $form_view->setAction(curl($environment->getCurrentContextID(),$environment->getCurrentModule(),$environment->getCurrentFunction(),''));
   $form_view->setForm($form);
   if ( $environment->inPortal() or $environment->inServer() ){
      $page->addForm($form_view);
   } else {
      $page->add($form_view);
   }
}
?>
Esempio n. 2
0
 public function IMS($session_id, $ims_xml)
 {
     if ($this->_isSessionValid($session_id)) {
         include_once 'classes/cs_connection_soap_ims.php';
         $ims_object = new cs_connection_soap_ims($this->_environment);
         $this->_updateSessionCreationDate($session_id);
         return $ims_object->IMS($session_id, $ims_xml);
     } else {
         return new SoapFault('ERROR', 'Session (' . $session_id . ') not valid!');
     }
 }