<?
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>
<?
}
?>
|