diff options
Diffstat (limited to 'samples/treegrid')
-rw-r--r-- | samples/treegrid/01_basic.html | 3 | ||||
-rw-r--r-- | samples/treegrid/01_basic_connector.php | 7 | ||||
-rw-r--r-- | samples/treegrid/02_dynamic_loading.html | 3 | ||||
-rw-r--r-- | samples/treegrid/02_dynamic_loading_connector.php | 7 | ||||
-rw-r--r-- | samples/treegrid/03_sql_config.html | 3 | ||||
-rw-r--r-- | samples/treegrid/03_sql_config_connector.php | 7 | ||||
-rw-r--r-- | samples/treegrid/04_custom_styles.html | 3 | ||||
-rw-r--r-- | samples/treegrid/04_custom_styles_connector.php | 7 | ||||
-rw-r--r-- | samples/treegrid/05_live_update.html | 4 | ||||
-rw-r--r-- | samples/treegrid/06_treegrid_group_connector.html | 4 | ||||
-rw-r--r-- | samples/treegrid/06_treegrid_group_connector.php | 7 | ||||
-rw-r--r-- | samples/treegrid/07_treegrid_multitable_connector.html | 4 | ||||
-rw-r--r-- | samples/treegrid/07_treegrid_multitable_connector.php | 7 |
13 files changed, 31 insertions, 35 deletions
diff --git a/samples/treegrid/01_basic.html b/samples/treegrid/01_basic.html index ae3e44c..6b4fd36 100644 --- a/samples/treegrid/01_basic.html +++ b/samples/treegrid/01_basic.html @@ -8,7 +8,6 @@ <script src="../dhtmlx/dhtmlx.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> @@ -33,7 +32,7 @@ if (!window.eXcell_tree) <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">mysql_connect</span><span style="color: #007700">(</span><span style="color: #0000BB">$mysql_server</span><span style="color: #007700">,</span><span style="color: #0000BB">$mysql_user</span><span style="color: #007700">,</span><span style="color: #0000BB">$mysql_pass</span><span style="color: #007700">); +<br /> </span><span style="color: #0000BB">$res</span><span style="color: #007700">=</span><span style="color: #0000BB"> new PDO</span><span style="color: #007700">(</span><span style="color: #0000BB">$mysql_server</span><span style="color: #007700">,</span><span style="color: #0000BB">$mysql_user</span><span style="color: #007700">,</span><span style="color: #0000BB">$mysql_pass</span><span style="color: #007700">); <br /> </span><span style="color: #0000BB">mysql_select_db</span><span style="color: #007700">(</span><span style="color: #0000BB">$mysql_db</span><span style="color: #007700">); <br /> <br /> require(</span><span style="color: #DD0000">"../../codebase/treegrid_connector.php"</span><span style="color: #007700">); diff --git a/samples/treegrid/01_basic_connector.php b/samples/treegrid/01_basic_connector.php index c9c020f..edc582a 100644 --- a/samples/treegrid/01_basic_connector.php +++ b/samples/treegrid/01_basic_connector.php @@ -1,10 +1,11 @@ <?php require_once("../config.php"); - $res=mysql_connect($mysql_server,$mysql_user,$mysql_pass); - mysql_select_db($mysql_db); + require_once('../../codebase/db_pdo.php'); + $res= new PDO($mysql_server,$mysql_user,$mysql_pass); + require("../../codebase/treegrid_connector.php"); - $tree = new TreeGridConnector($res); + $tree = new TreeGridConnector($res, "PDO"); $tree->render_table("tasks","taskId","taskName,duration,complete","","parentId"); ?>
\ No newline at end of file diff --git a/samples/treegrid/02_dynamic_loading.html b/samples/treegrid/02_dynamic_loading.html index 147b24f..a5ef6a0 100644 --- a/samples/treegrid/02_dynamic_loading.html +++ b/samples/treegrid/02_dynamic_loading.html @@ -7,7 +7,6 @@ <script src="../dhtmlx/dhtmlx.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> @@ -30,7 +29,7 @@ if (!window.eXcell_tree) <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">mysql_connect</span><span style="color: #007700">(</span><span style="color: #0000BB">$mysql_server</span><span style="color: #007700">,</span><span style="color: #0000BB">$mysql_user</span><span style="color: #007700">,</span><span style="color: #0000BB">$mysql_pass</span><span style="color: #007700">); +<br /> </span><span style="color: #0000BB">$res</span><span style="color: #007700">=</span><span style="color: #0000BB"> new PDO</span><span style="color: #007700">(</span><span style="color: #0000BB">$mysql_server</span><span style="color: #007700">,</span><span style="color: #0000BB">$mysql_user</span><span style="color: #007700">,</span><span style="color: #0000BB">$mysql_pass</span><span style="color: #007700">); <br /> </span><span style="color: #0000BB">mysql_select_db</span><span style="color: #007700">(</span><span style="color: #0000BB">$mysql_db</span><span style="color: #007700">); <br /> <br /> require(</span><span style="color: #DD0000">"../../codebase/treegrid_connector.php"</span><span style="color: #007700">); diff --git a/samples/treegrid/02_dynamic_loading_connector.php b/samples/treegrid/02_dynamic_loading_connector.php index 9cecc77..87065dd 100644 --- a/samples/treegrid/02_dynamic_loading_connector.php +++ b/samples/treegrid/02_dynamic_loading_connector.php @@ -1,10 +1,11 @@ <?php require_once("../config.php"); - $res=mysql_connect($mysql_server,$mysql_user,$mysql_pass); - mysql_select_db($mysql_db); + require_once('../../codebase/db_pdo.php'); + $res= new PDO($mysql_server,$mysql_user,$mysql_pass); + require("../../codebase/treegrid_connector.php"); - $tree = new TreeGridConnector($res); + $tree = new TreeGridConnector($res, "PDO"); $tree->dynamic_loading(true); $tree->render_table("tasks","taskId","taskName,duration,complete","","parentId"); diff --git a/samples/treegrid/03_sql_config.html b/samples/treegrid/03_sql_config.html index a4235fe..00e6cb5 100644 --- a/samples/treegrid/03_sql_config.html +++ b/samples/treegrid/03_sql_config.html @@ -7,7 +7,6 @@ <script src="../dhtmlx/dhtmlx.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> @@ -30,7 +29,7 @@ if (!window.eXcell_tree) <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">mysql_connect</span><span style="color: #007700">(</span><span style="color: #0000BB">$mysql_server</span><span style="color: #007700">,</span><span style="color: #0000BB">$mysql_user</span><span style="color: #007700">,</span><span style="color: #0000BB">$mysql_pass</span><span style="color: #007700">); +<br /> </span><span style="color: #0000BB">$res</span><span style="color: #007700">=</span><span style="color: #0000BB"> new PDO</span><span style="color: #007700">(</span><span style="color: #0000BB">$mysql_server</span><span style="color: #007700">,</span><span style="color: #0000BB">$mysql_user</span><span style="color: #007700">,</span><span style="color: #0000BB">$mysql_pass</span><span style="color: #007700">); <br /> </span><span style="color: #0000BB">mysql_select_db</span><span style="color: #007700">(</span><span style="color: #0000BB">$mysql_db</span><span style="color: #007700">); <br /> <br /> require(</span><span style="color: #DD0000">"../../codebase/treegrid_connector.php"</span><span style="color: #007700">); diff --git a/samples/treegrid/03_sql_config_connector.php b/samples/treegrid/03_sql_config_connector.php index bfab649..e4944cf 100644 --- a/samples/treegrid/03_sql_config_connector.php +++ b/samples/treegrid/03_sql_config_connector.php @@ -1,10 +1,11 @@ <?php require_once("../config.php"); - $res=mysql_connect($mysql_server,$mysql_user,$mysql_pass); - mysql_select_db($mysql_db); + require_once('../../codebase/db_pdo.php'); + $res= new PDO($mysql_server,$mysql_user,$mysql_pass); + require("../../codebase/treegrid_connector.php"); - $tree = new TreeGridConnector($res); + $tree = new TreeGridConnector($res, "PDO"); $tree->render_sql("SELECT * from tasks WHERE complete>49","taskId","taskName,duration,complete","","parentId"); ?>
\ No newline at end of file diff --git a/samples/treegrid/04_custom_styles.html b/samples/treegrid/04_custom_styles.html index b017656..45830d4 100644 --- a/samples/treegrid/04_custom_styles.html +++ b/samples/treegrid/04_custom_styles.html @@ -7,7 +7,6 @@ <script src="../dhtmlx/dhtmlx.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> @@ -30,7 +29,7 @@ if (!window.eXcell_tree) <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">mysql_connect</span><span style="color: #007700">(</span><span style="color: #0000BB">$mysql_server</span><span style="color: #007700">,</span><span style="color: #0000BB">$mysql_user</span><span style="color: #007700">,</span><span style="color: #0000BB">$mysql_pass</span><span style="color: #007700">); +<br /> </span><span style="color: #0000BB">$res</span><span style="color: #007700">=</span><span style="color: #0000BB"> new PDO</span><span style="color: #007700">(</span><span style="color: #0000BB">$mysql_server</span><span style="color: #007700">,</span><span style="color: #0000BB">$mysql_user</span><span style="color: #007700">,</span><span style="color: #0000BB">$mysql_pass</span><span style="color: #007700">); <br /> </span><span style="color: #0000BB">mysql_select_db</span><span style="color: #007700">(</span><span style="color: #0000BB">$mysql_db</span><span style="color: #007700">); <br /> <br /> require_once(</span><span style="color: #DD0000">"../../codebase/treegrid_connector.php"</span><span style="color: #007700">); diff --git a/samples/treegrid/04_custom_styles_connector.php b/samples/treegrid/04_custom_styles_connector.php index b10f033..44de104 100644 --- a/samples/treegrid/04_custom_styles_connector.php +++ b/samples/treegrid/04_custom_styles_connector.php @@ -1,10 +1,11 @@ <?php require_once("../config.php"); - $res=mysql_connect($mysql_server,$mysql_user,$mysql_pass); - mysql_select_db($mysql_db); + require_once('../../codebase/db_pdo.php'); + $res= new PDO($mysql_server,$mysql_user,$mysql_pass); + require_once("../../codebase/treegrid_connector.php"); - $tree = new TreeGridConnector($res); + $tree = new TreeGridConnector($res, "PDO"); function custom_format($item){ $item->set_row_color($item->get_value("complete")<75?"#AAFFFF":"#FFAAFF"); diff --git a/samples/treegrid/05_live_update.html b/samples/treegrid/05_live_update.html index faca89a..c8550b6 100644 --- a/samples/treegrid/05_live_update.html +++ b/samples/treegrid/05_live_update.html @@ -8,8 +8,6 @@ <script src="../dhtmlx/dhtmlx.js" type="text/javascript" charset="utf-8"></script> -<script src="../../codebase/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> @@ -38,7 +36,7 @@ if (!window.eXcell_tree) <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">mysql_connect</span><span style="color: #007700">(</span><span style="color: #0000BB">$mysql_server</span><span style="color: #007700">,</span><span style="color: #0000BB">$mysql_user</span><span style="color: #007700">,</span><span style="color: #0000BB">$mysql_pass</span><span style="color: #007700">); +<br /> </span><span style="color: #0000BB">$res</span><span style="color: #007700">=</span><span style="color: #0000BB"> new PDO</span><span style="color: #007700">(</span><span style="color: #0000BB">$mysql_server</span><span style="color: #007700">,</span><span style="color: #0000BB">$mysql_user</span><span style="color: #007700">,</span><span style="color: #0000BB">$mysql_pass</span><span style="color: #007700">); <br /> </span><span style="color: #0000BB">mysql_select_db</span><span style="color: #007700">(</span><span style="color: #0000BB">$mysql_db</span><span style="color: #007700">); <br /> <br /> require(</span><span style="color: #DD0000">"../../codebase/treegrid_connector.php"</span><span style="color: #007700">); diff --git a/samples/treegrid/06_treegrid_group_connector.html b/samples/treegrid/06_treegrid_group_connector.html index 830256b..5b7ec7d 100644 --- a/samples/treegrid/06_treegrid_group_connector.html +++ b/samples/treegrid/06_treegrid_group_connector.html @@ -7,8 +7,6 @@ <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> @@ -34,7 +32,7 @@ if (!window.eXcell_tree) <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">mysql_connect</span><span style="color: #007700">(</span><span style="color: #0000BB">$mysql_server</span><span style="color: #007700">,</span><span style="color: #0000BB">$mysql_user</span><span style="color: #007700">,</span><span style="color: #0000BB">$mysql_pass</span><span style="color: #007700">); +<br /> </span><span style="color: #0000BB">$res</span><span style="color: #007700">=</span><span style="color: #0000BB"> new PDO</span><span style="color: #007700">(</span><span style="color: #0000BB">$mysql_server</span><span style="color: #007700">,</span><span style="color: #0000BB">$mysql_user</span><span style="color: #007700">,</span><span style="color: #0000BB">$mysql_pass</span><span style="color: #007700">); <br /> </span><span style="color: #0000BB">mysql_select_db</span><span style="color: #007700">(</span><span style="color: #0000BB">$mysql_db</span><span style="color: #007700">); <br /> require(</span><span style="color: #DD0000">"../../codebase/treegridgroup_connector.php"</span><span style="color: #007700">); <br /> diff --git a/samples/treegrid/06_treegrid_group_connector.php b/samples/treegrid/06_treegrid_group_connector.php index 5a70e3c..e08e10d 100644 --- a/samples/treegrid/06_treegrid_group_connector.php +++ b/samples/treegrid/06_treegrid_group_connector.php @@ -1,11 +1,12 @@ <?php require_once("../config.php"); - $res=mysql_connect($mysql_server,$mysql_user,$mysql_pass); - mysql_select_db($mysql_db); + require_once('../../codebase/db_pdo.php'); + $res= new PDO($mysql_server,$mysql_user,$mysql_pass); + require_once('../../codebase/treegridgroup_connector.php'); - $treegrid = new TreeGridGroupConnector($res); + $treegrid = new TreeGridGroupConnector($res, "PDO"); $treegrid->render_table("products", "id", "product_name,scales,colour", "", "category"); diff --git a/samples/treegrid/07_treegrid_multitable_connector.html b/samples/treegrid/07_treegrid_multitable_connector.html index e2538a8..23379e2 100644 --- a/samples/treegrid/07_treegrid_multitable_connector.html +++ b/samples/treegrid/07_treegrid_multitable_connector.html @@ -8,8 +8,6 @@ <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> @@ -36,7 +34,7 @@ if (!window.eXcell_tree) <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">mysql_connect</span><span style="color: #007700">(</span><span style="color: #0000BB">$mysql_server</span><span style="color: #007700">,</span><span style="color: #0000BB">$mysql_user</span><span style="color: #007700">,</span><span style="color: #0000BB">$mysql_pass</span><span style="color: #007700">); +<br /> </span><span style="color: #0000BB">$res</span><span style="color: #007700">=</span><span style="color: #0000BB"> new PDO</span><span style="color: #007700">(</span><span style="color: #0000BB">$mysql_server</span><span style="color: #007700">,</span><span style="color: #0000BB">$mysql_user</span><span style="color: #007700">,</span><span style="color: #0000BB">$mysql_pass</span><span style="color: #007700">); <br /> </span><span style="color: #0000BB">mysql_select_db</span><span style="color: #007700">(</span><span style="color: #0000BB">$mysql_db</span><span style="color: #007700">); <br /> require(</span><span style="color: #DD0000">"../../codebase/treegridmultitable_connector.php"</span><span style="color: #007700">); <br /> diff --git a/samples/treegrid/07_treegrid_multitable_connector.php b/samples/treegrid/07_treegrid_multitable_connector.php index 4ced2a2..6dd0d9f 100644 --- a/samples/treegrid/07_treegrid_multitable_connector.php +++ b/samples/treegrid/07_treegrid_multitable_connector.php @@ -1,12 +1,13 @@ <?php require_once("../config.php"); - $res=mysql_connect($mysql_server,$mysql_user,$mysql_pass); - mysql_select_db($mysql_db); + require_once('../../codebase/db_pdo.php'); + $res= new PDO($mysql_server,$mysql_user,$mysql_pass); + require("../../codebase/treegridmultitable_connector.php"); - $treegrid = new TreeGridMultitableConnector($res); + $treegrid = new TreeGridMultitableConnector($res, "PDO"); $treegrid->setMaxLevel(3); $level = $treegrid->get_level(); |