</thead>
</table>
<?php 
$rs = mysql_query($sql, cnnGeneral());
$gvalues = "";
$gnames = "";
$i = 0;
$tds = "";
$mnt = 0;
$sm = 0;
while ($rw = mysql_fetch_array($rs)) {
    $val[] = round($rw[1] / 1000, 2);
    $lbl[] = $rw[0];
    $sm += $rw[1];
    $tds = $tds . "<tr>\n\t<td>{$rw['0']}</td>\n\t<td class='mny'>" . getFMoney($rw[1]) . "</td>\n\t\n\t</tr>";
    $i++;
}
//echo $gnames;
//echo $gvalues;
$sm = getFMoney($sm);
echo "<table width='100%' aling='center'>\n\t<tr>\n\t\t<th>Concepto</th>\n\t\t<th>Monto</th>\n\t</tr>\n\t\n\t{$tds}\n\t\n\t<tr>\n\t\t<td>Sumas</td>\n\t\t<td>{$sm}</td>\n\t</tr>\n\t\n\t</table>";
$x = new SAFEChart();
$x->setValues($val);
$x->setLabels($lbl);
$x->setTitle("SALDOS DE CREDITOS MINISTRADOS EN UN RANGO DE FECHAS(Miles)");
$mFile = $x->ChartPIE();
open_flash_chart_object(800, 512, $mFile, true, "../");
echo getRawFooter();
?>
</body>
</html>