<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<link rel="stylesheet" type="text/css" href="main.css"/>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?php
include('adodb/adodb.inc.php');
include('vsflexgrid.php');
$db =&NewADOConnection('ado_mssql');
//$db =&ADONewConnection('ado_mssql');
$dsn = "Driver={SQL Server};Server=localhost;Database=stekpi;";
$i=0;
$db->PConnect($dsn,'sa','mbakyul');
$grid=new vsflexgrid();
$rs = $db->Execute('select * from t_dosen');
$arr='';
if (!$rs)
print $db->ErrorMsg();
else
$grid->cols(4);
$grid->fixedalignment("L");
$grid->_border=1;
$grid->_cellspacing=1;
$grid->_bordercolor="red";
$grid->_colorheader="red";
$grid->_data_font_color="orange";
//$grid->_header_font_color="red";
$grid->_tablewidth="20%";
//$grid->colhidden(0);
$grid->colhidden(1);
//$grid->colhidden(2);
$z=0;
$grid->headers("No,Kode,Nama Dosen, Matakuliah");
while (!$rs->EOF) {
$z++;
$grid->textmatrix($z,$i,0);
$grid->textmatrix($rs->fields[1],$i,1);
$grid->textmatrix($rs->fields[2],$i,2);
$grid->textmatrix($rs->fields[3],$i,3);
$rs->MoveNext();
$i++;
}
$grid->display();
?>
</body>
</html>
|