diff options
author | Maksim <max@dhtmlx.com> | 2011-07-18 18:21:10 +0300 |
---|---|---|
committer | Maksim <max@dhtmlx.com> | 2011-07-18 18:21:10 +0300 |
commit | 5c2afae6cf595c981155ac68501ac2d1af77db54 (patch) | |
tree | b07de6379fb3eb540df732a57061cafd05288599 /samples/grid/xx_sample_postgresql.html | |
download | connector-php-5c2afae6cf595c981155ac68501ac2d1af77db54.zip connector-php-5c2afae6cf595c981155ac68501ac2d1af77db54.tar.gz connector-php-5c2afae6cf595c981155ac68501ac2d1af77db54.tar.bz2 |
* import of php connector v1.2
Diffstat (limited to 'samples/grid/xx_sample_postgresql.html')
-rw-r--r-- | samples/grid/xx_sample_postgresql.html | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/samples/grid/xx_sample_postgresql.html b/samples/grid/xx_sample_postgresql.html new file mode 100644 index 0000000..737849f --- /dev/null +++ b/samples/grid/xx_sample_postgresql.html @@ -0,0 +1,38 @@ +
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+ <title>For demo purpose only :: &1</title>
+
+
+
+
+<script src="../dhtmlx/dhtmlx.js" type="text/javascript" charset="utf-8"></script>
+<script src="../dhtmlx/dhtmlxdataprocessor.js" type="text/javascript" charset="utf-8"></script>
+<script src="../../codebase/connector.js" type="text/javascript" charset="utf-8"></script>
+<link rel="stylesheet" href="../dhtmlx/dhtmlx.css" type="text/css" charset="utf-8">
+</head>
+<body>
+ <div id="gridbox" width="350px" height="550px" style="background-color:white;overflow:hidden"></div>
+<script>
+ mygrid = new dhtmlXGridObject('gridbox');
+ mygrid.setImagePath("../common/imgs/");
+ mygrid.setHeader("Column A, Column B");
+ mygrid.attachHeader("#connector_text_filter,#connector_text_filter")
+ mygrid.setInitWidths("100,*")
+ mygrid.setColTypes("edtxt,ed");
+ mygrid.setColSorting("connector,connector")
+ mygrid.enableSmartRendering(true)
+ mygrid.enableMultiselect(true)
+ mygrid.init();
+ mygrid.loadXML("xx_sample_postgresql_connector.php");
+ var dp = new dataProcessor("xx_sample_postgresql_connector.php");
+ dp.init(mygrid);
+</script>
+<input type="button" name="add" value="add row" onclick="var id=mygrid.uid(); mygrid.addRow(id,'',0); mygrid.showRow(id);">
+<input type="button" name="delete" value="delete row" onclick="mygrid.deleteSelectedRows()">
+<div class='code'><code><span style="color: #000000"> +<span style="color: #0000BB"><?php
<br /> </span><span style="color: #007700">require_once(</span><span style="color: #DD0000">"../config.php"</span><span style="color: #007700">);
<br /> </span><span style="color: #0000BB">$res</span><span style="color: #007700">=</span><span style="color: #0000BB">pg_connect</span><span style="color: #007700">(</span><span style="color: #0000BB">$postrgre_connection</span><span style="color: #007700">);
<br />
<br /> require(</span><span style="color: #DD0000">"../../codebase/grid_connector.php"</span><span style="color: #007700">);
<br /> require(</span><span style="color: #DD0000">"../../codebase/db_postgre.php"</span><span style="color: #007700">);
<br />
<br /> </span><span style="color: #0000BB">$grid </span><span style="color: #007700">= new </span><span style="color: #0000BB">GridConnector</span><span style="color: #007700">(</span><span style="color: #0000BB">$res</span><span style="color: #007700">,</span><span style="color: #DD0000">"Postgre"</span><span style="color: #007700">);
<br /> </span><span style="color: #0000BB">$grid</span><span style="color: #007700">-></span><span style="color: #0000BB">enable_log</span><span style="color: #007700">(</span><span style="color: #DD0000">"temp.log"</span><span style="color: #007700">,</span><span style="color: #0000BB">true</span><span style="color: #007700">);
<br /> </span><span style="color: #0000BB">$grid</span><span style="color: #007700">-></span><span style="color: #0000BB">dynamic_loading</span><span style="color: #007700">(</span><span style="color: #0000BB">100</span><span style="color: #007700">);
<br /> </span><span style="color: #0000BB">$grid</span><span style="color: #007700">-></span><span style="color: #0000BB">render_table</span><span style="color: #007700">(</span><span style="color: #DD0000">"grid50000"</span><span style="color: #007700">,</span><span style="color: #DD0000">""</span><span style="color: #007700">,</span><span style="color: #DD0000">"item_nm,item_cd"</span><span style="color: #007700">);
<br /></span><span style="color: #0000BB">?></span> +</span> +</code></div></body>
+</html>
|