You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

69 lines
1.1 KiB

<?php
require_once("../../base/php/startSession.php");
require_once("../../base/php//classDatabase.php");
require_once( "../../base/php/Functions.php" );
global $database;
$database = new Database("iCTI");
//echo $softCode;
$httpString = "";
$httpString = $httpString . "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>";
$httpString = $httpString . "\n<HTTP_SERVICE>";
$sqlcmd = "SELECT oid, code, texte
FROM activite.t_budgets
ORDER BY code ";
$result = $database->exec($sqlcmd);
if ($result != false) {
// lignes
$ok = TRUE;
while ($ok == TRUE) {
$ok = FALSE;
$record = $database->nextRecordInto();
if ($record != FALSE) {
$ok = TRUE;
$oid = floatval(trim($record[0]));
$code = toHTML(trim($record[1]));
$texte = toHTML(trim($record[2]));
$httpString = $httpString .
"\r\n<BUDGET
oid=\"$oid\"
code=\"$code\"
texte=\"$texte\"
>
\r\n</BUDGET>";
}
}
}
$httpString = $httpString . "\n</HTTP_SERVICE>";
$httpString = compress64($httpString);
echo "<CTICONTENT>$httpString</CTICONTENT>";
?>