home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cricao de Sites - 650 Layouts Prontos
/
WebMasters.iso
/
Servidores
/
bb98.exe
/
SOtest.php
< prev
next >
Wrap
Text File
|
2002-09-02
|
2KB
|
89 lines
<html><body>
<?php
include("SOaccess.php");
include("SOexcel.php");
include("SOexcelu.php");
include("SOword.php");
include("SOinit.php");
$arrayAccessData = array();
$arrayExcelData = array();
do {
// Initialize.
//
$errmsg = SOInit("127.0.0.1:7777");
if (strlen($errmsg)) {
echo("<b>Initialization Error</b>: ".$errmsg."<br>");
}
// Grab the test Word data.
//
$sPage = "";
$errmsg = SOWord(
"127.0.0.1:7777", "path3", "momentum-fischer-pumps.doc",
$sPage, "percy", "percy"
);
if (strlen($errmsg)) {
echo("<b>SOWord Error</b>: ".$errmsg."<br>");
} else {
echo("Word data: ".$sPage."<BR>");
}
// Try to grab Excel data with bad credentials (username/password).
//
$errmsg = SOExcel(
"127.0.0.1:7777", "path3", "ITS_Sales_Funnel___May_12.xls", 1,
$arrayExcelData, "A1", "K35", "percy", "not-the-right-password"
);
if (strlen($errmsg)) {
echo("<b>SOExcel Error</b>: ".$errmsg."<br>");
}
// Grab the test Excel data.
//
$errmsg = SOExcel(
"127.0.0.1:7777", "path3", "ITS_Sales_Funnel___May_12.xls", 1,
$arrayExcelData, "A1", "K35", "percy", "percy"
);
if (strlen($errmsg)) {
echo("<b>SOExcel Error</b>: ".$errmsg."<br>");
} else {
echo("Cell A3: ".$arrayExcelData["A3"]."<BR>");
echo("Cell D17: ".$arrayExcelData["D17"]."<BR>");
}
// Update Excel data.
//
$errmsg = SOExcelUpdate("127.0.0.1:7777", "path3", "beautyJungleRevenue.xls", 1,
"F3", "1-14-1961", "D",
"percy", "percy");
if (strlen($errmsg)) {
echo("<b>SOExcelUpdate Error</b>: ".$errmsg."<br>");
} else {
echo("No error reported updating Excel<br>");
}
// Grab the test Access data.
//
$errmsg = SOAccess("127.0.0.1:7777", "path11", "mlb2000.mdb",
"Batters 200 Hits", $arrayAccessData, 0, 100,
"percy", "percy"
);
if (strlen($errmsg)) {
echo("<b>SOAccess Error</b>: ".$errmsg."<br>");
} else {
echo("Row 3 Firstname: ".$arrayAccessData[3]["firstname"]."<BR>");
echo("Row 9 Year: ".$arrayAccessData[9]["year"]."<BR>");
echo("Row 21 Expr1: ".$arrayAccessData[21]["expr1"]."<BR>");
echo("Row 99 lastname: ".$arrayAccessData[99]["lastname"]."<BR>");
echo("Row 99 hr: ".$arrayAccessData[99]["hr"]."<BR>");
echo("Row 99 rbi: ".$arrayAccessData[99]["rbi"]."<BR>");
}
} while (0);
?>
</body></html>