Login   Register  
PHP Classes
elePHPant
Icontem

File: test.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Kalev Haga  >  SAPConnect  >  test.php  >  Download  
File: test.php
Role: Unit test script
Content type: text/plain
Description: Test script
Class: SAPConnect
Connect to SAP R/3
Author: By
Last change:
Date: 2002-09-26 06:01
Size: 1,079 bytes
 

Contents

Class file image Download
<?

include_once "SAPConnect.php";

class 
ZPHP_Test extends SAPConnect
{
  function 
ZPHP_Test($tekst1="",$tekst2="")
  {
      
$this->SAPConnect("D:/www/sap/MLS.php");
      if (!
$this->Rfc) return;
      
$this->OpenFunction("zphp_test");
      
$this->AddImport("tekst1",$tekst1);
      
$this->AddImport("tekst2",$tekst2);
      
$this->Run();
      
$this->Close();
  }

  function 
ReturnValue()
  {
    return 
$this->GetValue("resultaat");
  }

}

if (
$action=="run")
{

   
$TEST = new ZPHP_Test($tekst1,$tekst2);

   echo 
"<H1>".$TEST->ReturnValue()."</H1>";

}

{
  
?>
  <FORM NAME=TEST ACTION=index.php METHOD=POST>
  <TABLE BORDER=1 CELLPADDING=7>
  <TR><TD>Esimene tekst:</TD><TD><INPUT TYPE=TEXT NAME="tekst1" SIZE=20 VALUE="<? echo $tekst1;?>"></TD></TR>
  <TR><TD>Teine tekst:</TD><TD><INPUT TYPE=TEXT NAME="tekst2" SIZE=20 VALUE="<? echo $tekst2;?>"></TD></TR>
  <INPUT TYPE=hidden NAME="action" VALUE="run">
  <TR><TD COLSPAN=2 ALIGN=CENTER><INPUT TYPE=SUBMIT VALUE="Test"></TD></TR>
  </TABLE>
  </FORM>
  
  <?
}  

?>