2 if (!isset ($_SESSION)) session_start();
3 header("Cache-Control: no-cache");
4 header("Pragma: no-cache");
5 header("Expires: ".gmdate("D, d M Y H:i:s",time()+(-1*60))." GMT");
6 header('Content-type: text/html; charset=utf-8');
9 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
12 <title>Rico LiveGrid-Shippers (editable)</title>
15 require "dbConnect.php";
16 require "LoadRicoClient.php";
17 require "../../plugins/php/ricoLiveGridForms.php";
19 <script type='text/javascript'>
20 Rico.loadModule('LiveGridForms');
23 <link href="../demo.css" type="text/css" rel="stylesheet" />
24 <style type="text/css">
28 #explanation * { font-size: 8pt; }
34 //************************************************************************************************************
35 // LiveGrid-Edit Example
36 //************************************************************************************************************
38 //************************************************************************************************************
39 if (OpenGridForm("", "shippers")) {
40 if ($oForm->action == "table") {
51 function DisplayTable() {
54 echo "<table id='explanation' border='0' cellpadding='0' cellspacing='5' style='clear:both'><tr valign='top'><td>";
55 echo "Base Library: <script type='text/javascript'>document.write(Rico.Lib+' '+Rico.LibVersion);</script>";
56 echo "<hr>The data on this grid can be edited using pop-up forms. ";
57 echo "Just click on a grid cell and then select Edit, Delete, or Add from the pop-up menu. ";
58 echo "The Add and Edit forms are automatically generated by LiveGrid. ";
59 echo "Updates are disabled on the database, so you will get an error message if you try to save.";
62 echo "</td></tr></table>";
64 echo "<p><strong>Shippers Table</strong></p>";
65 $oForm->options["frozenColumns"]=1;
66 $oForm->options["menuEvent"]='click';
67 $oForm->options["highlightElem"]='cursorRow';
69 //echo "<p><textarea id='shippers_debugmsgs' rows='5' cols='80' style='font-size:smaller;'></textarea>";
72 function DefineFields() {
75 $oForm->AddEntryFieldW("ShipperID", "ID", "B", "<auto>",50);
76 $oForm->AddEntryFieldW("CompanyName", "Company Name", "B", "", 150);
77 $oForm->ConfirmDeleteColumn();
79 $oForm->AddEntryFieldW("Phone", "Phone Number", "B", "", 150);
81 $oForm->DisplayPage();