Location: PHPKode > scripts > SuperTable > supertable/test.php
<?php

include("../ttn_includes/html_classes.inc");
//include("../ttn_includes/connect.inc");
$connect = odbc_connect("war_odbc","","") or die("DSN Connection Failed");

//$opdr = 3;
//if (!empty($sb1)) print $sb1;

// Set object properties
/*
$lbList = new ListBox("lb2[]");
$lbList->Connection = $connect;
$lbList->SQLQuery_items = "select vrt_merk from ttn_voertuigen";
*/
/*$tbOpmerkingMs = new TextBox("opmerkms");
$tbOpmerkingMs->Connection = $connect;
$tbOpmerkingMs->SQL_Show_Query = "select sod_opmerkingms from ttn_serviceopdrachten where sod_id = 5;";
if (!empty($opmerkms)) $tbOpmerkingMs->SQL_Update_Query = "update ttn_serviceopdrachten set sod_opmerkingms = '".$opmerkms."' where sod_id = 5;";
*/
/*
$Hoi = new TextArea("taHoi");
$Hoi->Connection = $connect;
$Hoi->SQL_Show_Query = "select sod_opmerkingms from ttn_serviceopdrachten where sod_id = 5;";
$Hoi->Show_Counter_Function();
$Hoi->Show_Textcolor_Function();
*/

/*$cbKlaar = new CheckBox("cbkl");
$cbKlaar->Connection = $connect;
$cbKlaar->SQL_Show_Query = "select tst_bit from war_test where tst_id = 2;";
$cbKlaar->Grey_Out = 0;
*/
/*$winEen = new WindowLink();
$winEen->Image = "..//ttn_icons//edit.gif";
$winEen->Description = "";
*/


$tblTable = new SuperTable("test.php");
$tblTable->Connection = $connect;
//$tblTable->SQLQuery = "select a.arm_name, a.arm_color, a.arm_id from war_army a, war_objects o where a.arm_id = o.obj_army";// no ; in SQL(!) for orderby
$tblTable->SQLQuery = "select * from objects";// no ; in SQL(!) for orderby
$tblTable->Header_fields = array("Kenteken","Merk","Bandmaat");
$tblTable->Edits = 1;
$tblTable->Deletes = 1;
//$tblTable->Delete_question = 0;
$tblTable->Order_columns = array(1,2,3);
if (!empty($orderby)) $tblTable->Order_by_col_nr = $orderby;
if (!empty($subm)) $tblTable->SQLQuery_new_row = "insert into war_army(arm_color,arm_name) values('kleur','name');";
if (!empty($del_id)) $tblTable->SQLQuery_delete = "delete from objects where id = ".$del_id.";";


// Graphical User Interface

print"\n<form method='post' action='test.php' name='c'>\n";

//$lbKlant->Show();
//print"<br>";

//$sbKlant->Show();
//print"<br>";

//$tbOpmerkingMs->Show();
/*
print"<br>";
$Hoi->Show();
$Hoi->Show_Counter();
$Hoi->Show_Textcolor_Button();
*/
//print"<br>";
//$mmOpmerkingTd->Show();
//print"<br>";
//print"<br>";

//$cbKlaar->Show();
//print"<br>";

//$winEen->URL = "wijzig.php";
//$winEen->Show();

//print"<input type=checkbox checked disabled>";

$tblTable->Show();

/*
$sb = new SelectBox("sb1");
$sb->Connection = $connect;
$sb->SQLQuery_items = "select sod_id,sod_opmerkingms from ttn_serviceopdrachten;";
$sb->Show();
*/
//$lbList->Show();

print"<input type=submit name=subm value='new row'>\n";
print"</form>\n";
?>
Return current item: SuperTable